Errant logs
This commit is contained in:
parent
7d92daeccd
commit
2008888a16
1
exam/dist/assets/index-BliQ0crd.js
vendored
1
exam/dist/assets/index-BliQ0crd.js
vendored
File diff suppressed because one or more lines are too long
1
exam/dist/assets/index-CB6IjOSm.js
vendored
Normal file
1
exam/dist/assets/index-CB6IjOSm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
exam/dist/index.html
vendored
2
exam/dist/index.html
vendored
@ -5,7 +5,7 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/phpCourse/exam/dist/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/phpCourse/exam/dist/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React + TS</title>
|
<title>Vite + React + TS</title>
|
||||||
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-BliQ0crd.js"></script>
|
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-CB6IjOSm.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/react-C_FdcE2X.js">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/react-C_FdcE2X.js">
|
||||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/mui-53GMXZgr.js">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/mui-53GMXZgr.js">
|
||||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/tanstack-ZGp-Rrdw.js">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/tanstack-ZGp-Rrdw.js">
|
||||||
|
|||||||
2
exam/dist/stats.html
vendored
2
exam/dist/stats.html
vendored
File diff suppressed because one or more lines are too long
@ -21,7 +21,6 @@ const ErrorComponent: FC<Props> = ({ error, context, color = 'error.main' }) =>
|
|||||||
return <Typography color={color}>{t(error.code, { context: `${error.entity}:${context}` })}</Typography>;
|
return <Typography color={color}>{t(error.code, { context: `${error.entity}:${context}` })}</Typography>;
|
||||||
case ERRORS.NOT_ALLOWED:
|
case ERRORS.NOT_ALLOWED:
|
||||||
case ERRORS.UNAUTHORIZED:
|
case ERRORS.UNAUTHORIZED:
|
||||||
console.log(error, context);
|
|
||||||
return <Typography color={color}>{t(error.code, { context })}</Typography>;
|
return <Typography color={color}>{t(error.code, { context })}</Typography>;
|
||||||
case ERRORS.FAILED_UPDATE:
|
case ERRORS.FAILED_UPDATE:
|
||||||
return error.fields.map((field: string, index: number) => (
|
return error.fields.map((field: string, index: number) => (
|
||||||
|
|||||||
@ -41,12 +41,10 @@ export const Route = createFileRoute(`${ROUTES.PROFILE}/$id`)({
|
|||||||
stringify: ({ id }) => ({ id: id.toString() }),
|
stringify: ({ id }) => ({ id: id.toString() }),
|
||||||
},
|
},
|
||||||
loader: ({ context: { queryClient, Api }, params: { id } }) => {
|
loader: ({ context: { queryClient, Api }, params: { id } }) => {
|
||||||
console.log('LOAD PROFILE');
|
|
||||||
queryClient.ensureQueryData(profileQueryOptions(Api, id));
|
queryClient.ensureQueryData(profileQueryOptions(Api, id));
|
||||||
queryClient.ensureQueryData(profilePostsQueryOptions(Api, id));
|
queryClient.ensureQueryData(profilePostsQueryOptions(Api, id));
|
||||||
},
|
},
|
||||||
beforeLoad: ({ params: { id }, context: { Api } }) => {
|
beforeLoad: ({ params: { id }, context: { Api } }) => {
|
||||||
console.log('BEFORE PROFILE');
|
|
||||||
if (!Api.hasAuth) throw redirect({ to: ROUTES.INDEX });
|
if (!Api.hasAuth) throw redirect({ to: ROUTES.INDEX });
|
||||||
if (id === Api.authenticatedUser?.id) throw redirect({ to: ROUTES.PROFILE });
|
if (id === Api.authenticatedUser?.id) throw redirect({ to: ROUTES.PROFILE });
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user