chore: make things work on next 13
This commit is contained in:
parent
b7c0c85639
commit
d5984f4141
4 changed files with 11 additions and 9 deletions
|
@ -57,7 +57,7 @@ import { friendlyThemeName, themes } from './Theming';
|
|||
|
||||
function MenuItemLink(props) {
|
||||
return (
|
||||
<Link href={props.href} passHref>
|
||||
<Link href={props.href} passHref legacyBehavior>
|
||||
<MenuItem {...props} />
|
||||
</Link>
|
||||
);
|
||||
|
@ -258,7 +258,7 @@ export default function Layout({ children, props }) {
|
|||
<Navbar pt='sm' hiddenBreakpoint='sm' hidden={!opened} width={{ sm: 200, lg: 230 }}>
|
||||
<Navbar.Section grow component={ScrollArea}>
|
||||
{items.map(({ icon, text, link }) => (
|
||||
<Link href={link} key={text} passHref>
|
||||
<Link href={link} key={text} passHref legacyBehavior>
|
||||
<NavLink
|
||||
component='a'
|
||||
label={text}
|
||||
|
@ -278,7 +278,7 @@ export default function Layout({ children, props }) {
|
|||
{admin_items
|
||||
.filter((x) => x.if(props))
|
||||
.map(({ icon, text, link }) => (
|
||||
<Link href={link} key={text} passHref>
|
||||
<Link href={link} key={text} passHref legacyBehavior>
|
||||
<NavLink
|
||||
component='a'
|
||||
label={text}
|
||||
|
@ -294,7 +294,7 @@ export default function Layout({ children, props }) {
|
|||
<Navbar.Section>
|
||||
{external_links.length
|
||||
? external_links.map(({ label, link }, i) => (
|
||||
<Link href={link} passHref key={i}>
|
||||
<Link href={link} passHref key={i} legacyBehavior>
|
||||
<NavLink
|
||||
label={label}
|
||||
component='a'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { NextLink as Link } from '@mantine/next';
|
||||
import { NextLink } from '@mantine/next';
|
||||
|
||||
export default Link;
|
||||
export default function Link(props) {
|
||||
return <NextLink legacyBehavior {...props} />;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export default function Files({ disableMediaPreview }) {
|
|||
<>
|
||||
<Group mb='md'>
|
||||
<Title>Files</Title>
|
||||
<Link href='/dashboard/upload' passHref>
|
||||
<Link href='/dashboard/upload' passHref legacyBehavior>
|
||||
<ActionIcon component='a' variant='filled' color='primary'>
|
||||
<PlusIcon />
|
||||
</ActionIcon>
|
||||
|
|
|
@ -78,7 +78,7 @@ export default function Login({ title, user_registration, oauth_registration, oa
|
|||
{user_registration && (
|
||||
<>
|
||||
<Divider label='or' labelPosition='center' my='sm' />
|
||||
<Link href='/auth/register' passHref>
|
||||
<Link href='/auth/register' passHref legacyBehavior>
|
||||
<Button size='lg' fullWidth component='a'>
|
||||
Register
|
||||
</Button>
|
||||
|
@ -89,7 +89,7 @@ export default function Login({ title, user_registration, oauth_registration, oa
|
|||
<>
|
||||
<Divider label='or' labelPosition='center' my='sm' />
|
||||
{oauth_providers.map(({ url, name, Icon }, i) => (
|
||||
<Link key={i} href={url} passHref>
|
||||
<Link key={i} href={url} passHref legacyBehavior>
|
||||
<Button size='lg' fullWidth leftIcon={<Icon />} component='a' my={8}>
|
||||
Login in with {name}
|
||||
</Button>
|
||||
|
|
Loading…
Reference in a new issue