better callbacks, fix config leak
This commit is contained in:
1 parent
dfd78b9ca4
commit
9bdeec90f2
5 files changed
+133
-54
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Container, Group, Text } from '@mantine/core'
|
||||
import classes from '@/styles/Header.module.css'
|
||||
import config from '@/uptime.config'
|
||||
import { pageConfig } from '@/uptime.config'
|
||||
|
||||
export default function Header() {
|
||||
const linkToElement = (link: { label: string; link: string; highlight?: boolean }) => {
|
||||
@@ -38,11 +38,11 @@ export default function Header() {
|
||||
</div>
|
||||
|
||||
<Group gap={5} visibleFrom="sm">
|
||||
{config.page.links.map(linkToElement)}
|
||||
{pageConfig.links.map(linkToElement)}
|
||||
</Group>
|
||||
|
||||
<Group gap={5} hiddenFrom="sm">
|
||||
{config.page.links.filter((link) => (link as any).highlight).map(linkToElement)}
|
||||
{pageConfig.links.filter((link) => (link as any).highlight).map(linkToElement)}
|
||||
</Group>
|
||||
</Container>
|
||||
</header>
|
||||
|
||||
Reference in new issue
Block a user