mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
fix: navbar & footer broken links
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import PATHS from '#core/constants/paths';
|
||||
import { Link } from '@inertiajs/react';
|
||||
import { route } from '@izzyjs/route/client';
|
||||
import { Anchor, Group, Text } from '@mantine/core';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -21,7 +20,7 @@ export function MantineFooter() {
|
||||
const items = links.map((link) => (
|
||||
<Anchor
|
||||
c="dimmed"
|
||||
component={Link}
|
||||
component={ExternalLink}
|
||||
key={link.label}
|
||||
href={link.link}
|
||||
size="sm"
|
||||
|
||||
@@ -17,7 +17,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import ExternalLink from '~/components/common/external_link';
|
||||
import { MantineLanguageSwitcher } from '~/components/common/language_switcher';
|
||||
import { MantineThemeSwitcher } from '~/components/common/theme_switcher';
|
||||
import { MantineUserCard } from '~/components/common/user_card';
|
||||
import useUser from '~/hooks/use_user';
|
||||
import classes from './mobile.module.css';
|
||||
|
||||
@@ -31,7 +30,9 @@ export default function Navbar() {
|
||||
<Box pb={40}>
|
||||
<header className={classes.header}>
|
||||
<Group justify="space-between" h="100%">
|
||||
<Image src="/logo-light.png" h={35} alt="MyLinks's logo" />
|
||||
<Link href="/">
|
||||
<Image src="/logo-light.png" h={35} alt="MyLinks's logo" />
|
||||
</Link>
|
||||
|
||||
<Group h="100%" gap={0} visibleFrom="sm">
|
||||
<Link href="/" className={classes.link}>
|
||||
@@ -102,11 +103,13 @@ export default function Navbar() {
|
||||
|
||||
<Group justify="center" grow pb="xl" px="md">
|
||||
{!isAuthenticated ? (
|
||||
<Button component="a" href={route('auth').path}>
|
||||
<Button component="a" href={route('auth').path} w={110}>
|
||||
{t('login')}
|
||||
</Button>
|
||||
) : (
|
||||
<MantineUserCard />
|
||||
<Button component={Link} href={route('dashboard').path} w={110}>
|
||||
Dashboard
|
||||
</Button>
|
||||
)}
|
||||
</Group>
|
||||
</ScrollArea>
|
||||
|
||||
Reference in New Issue
Block a user