Hide changelog versions on medium screen

This commit is contained in:
Misode
2022-07-02 02:06:29 +02:00
parent 231b032029
commit b09ed80d20
2 changed files with 6 additions and 3 deletions

View File

@@ -116,10 +116,12 @@ function Versions() {
function Changelog() {
const { locale } = useLocale()
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])
return <ToolGroup title={locale('changelog')} link="/changelog/" titleIcon="git_commit">
{latestChanges?.map(change => <ChangelogEntry change={change} />)}
{latestChanges?.map(change => <ChangelogEntry minimal={!hugeScreen} change={change} />)}
</ToolGroup>
}