Hide pack format bumps on the homepage

This commit is contained in:
Misode
2024-10-03 04:56:04 +02:00
parent 2344753db3
commit f893c1e2d4

View File

@@ -130,7 +130,12 @@ function Changelog() {
const hugeScreen = useMediaQuery('(min-width: 960px)')
const { value: changes } = useAsync(fetchChangelogs, [])
const latestChanges = useMemo(() => changes?.sort((a, b) => b.order - a.order).slice(0, 2), [changes])
const latestChanges = useMemo(() => {
return changes
?.sort((a, b) => b.order - a.order)
.filter(c => !(c.tags.includes('pack') && c.tags.includes('breaking')))
.slice(0, 2)
}, [changes])
return <ToolGroup title={locale('changelog')} link="/changelog/" titleIcon="git_commit">
{latestChanges?.map(change => <ChangelogEntry minimal={!hugeScreen} short={true} change={change} />)}