1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

(nextjs) fixed flow loading, anchors and styles

This commit is contained in:
Fedor Katurov 2022-01-17 16:13:45 +07:00
parent 2e0ad878a3
commit c5bac54494
11 changed files with 90 additions and 70 deletions

View file

@ -0,0 +1,9 @@
import { useRouteMatch } from 'react-router';
import { useRouter } from 'next/router';
import { CONFIG } from '~/utils/config';
export const useNodePageParams = () => {
return CONFIG.isNextEnvironment
? (useRouter().query.id as string)
: useRouteMatch<{ id: string }>().params.id;
};