mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
feat: migrate from paths constant to new route management system
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import KEYS from '#constants/keys';
|
||||
import PATHS from '#constants/paths';
|
||||
import type Collection from '#models/collection';
|
||||
import Link from '#models/link';
|
||||
import styled from '@emotion/styled';
|
||||
@@ -116,14 +115,16 @@ function DashboardProviders(
|
||||
useHotkeys(
|
||||
KEYS.OPEN_CREATE_LINK_KEY,
|
||||
() => {
|
||||
router.visit(`${PATHS.LINK.CREATE}?collectionId=${activeCollection?.id}`);
|
||||
router.visit(
|
||||
appendCollectionId(route('link.create-form').url, activeCollection?.id)
|
||||
);
|
||||
},
|
||||
{ enabled: globalHotkeysEnabled }
|
||||
);
|
||||
useHotkeys(
|
||||
KEYS.OPEN_CREATE_COLLECTION_KEY,
|
||||
() => {
|
||||
router.visit(PATHS.COLLECTION.CREATE);
|
||||
router.visit(route('collection.create-form').url);
|
||||
},
|
||||
{ enabled: globalHotkeysEnabled }
|
||||
);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { route } from '@izzyjs/route/client';
|
||||
import ContentLayout from '~/components/layouts/content_layout';
|
||||
import PATHS from '../../app/constants/paths';
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<ContentLayout>
|
||||
<a href={PATHS.AUTH.GOOGLE}>Continue with Google</a>
|
||||
</ContentLayout>
|
||||
);
|
||||
}
|
||||
const LoginPage = () => (
|
||||
<ContentLayout>
|
||||
<a href={route('auth.google').url}>Continue with Google</a>
|
||||
</ContentLayout>
|
||||
);
|
||||
export default LoginPage;
|
||||
|
||||
Reference in New Issue
Block a user