feat: migrate from paths constant to new route management system

This commit is contained in:
Sonny
2024-05-16 18:53:53 +02:00
committed by Sonny
parent 905f0ba1c7
commit 57ed2c5e94
20 changed files with 82 additions and 75 deletions

View File

@@ -1,11 +1,11 @@
import styled from '@emotion/styled';
import { Link } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { FormEvent, ReactNode } from 'react';
import Button from '~/components/common/form/_button';
import Form from '~/components/common/form/_form';
import BaseLayout from './_base_layout';
import { appendCollectionId } from '~/lib/navigation';
import PATHS from '#constants/paths';
import BaseLayout from './_base_layout';
const FormLayoutStyle = styled.div(({ theme }) => ({
height: 'fit-content',
@@ -49,7 +49,7 @@ const FormLayout = ({
</Button>
</Form>
{!disableHomeLink && (
<Link href={appendCollectionId(PATHS.DASHBOARD, collectionId)}>
<Link href={appendCollectionId(route('dashboard').url, collectionId)}>
Back to home
</Link>
)}