Change i18n package to paraglideJs
also refactor auth provider
This commit is contained in:
18
src/routes/(app)/(auth)/account/change-password.tsx
Normal file
18
src/routes/(app)/(auth)/account/change-password.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import ChangePasswordForm from '@/components/form/change-password-form';
|
||||
import { m } from '@/paraglide/messages';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/(app)/(auth)/account/change-password')({
|
||||
component: RouteComponent,
|
||||
staticData: { breadcrumb: () => m.nav_change_password() },
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return (
|
||||
<div className="@container/main flex flex-1 flex-col gap-2 p-4">
|
||||
<div className="*:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card dark:*:data-[slot=card]:bg-card *:data-[slot=card]:bg-linear-to-br *:data-[slot=card]:shadow-xs grid grid-cols-1 @xl/main:grid-cols-2 @5xl/main:grid-cols-3 gap-4">
|
||||
<ChangePasswordForm />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
9
src/routes/(app)/(auth)/account/index.tsx
Normal file
9
src/routes/(app)/(auth)/account/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/(app)/(auth)/account/')({
|
||||
component: RouteComponent,
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return <div>Hello "/(app)/(auth)/account/"!</div>;
|
||||
}
|
||||
18
src/routes/(app)/(auth)/account/profile.tsx
Normal file
18
src/routes/(app)/(auth)/account/profile.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import ProfileForm from '@/components/form/profile-form';
|
||||
import { m } from '@/paraglide/messages';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/(app)/(auth)/account/profile')({
|
||||
component: RouteComponent,
|
||||
staticData: { breadcrumb: () => m.nav_profile() },
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return (
|
||||
<div className="@container/main flex flex-1 flex-col gap-2 p-4">
|
||||
<div className="*:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card dark:*:data-[slot=card]:bg-card *:data-[slot=card]:bg-linear-to-br *:data-[slot=card]:shadow-xs grid grid-cols-1 @xl/main:grid-cols-2 @5xl/main:grid-cols-3 gap-4">
|
||||
<ProfileForm />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
6
src/routes/(app)/(auth)/account/route.tsx
Normal file
6
src/routes/(app)/(auth)/account/route.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { m } from '@/paraglide/messages';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/(app)/(auth)/account')({
|
||||
staticData: { breadcrumb: () => m.nav_account() },
|
||||
});
|
||||
11
src/routes/(app)/(auth)/account/settings.tsx
Normal file
11
src/routes/(app)/(auth)/account/settings.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { m } from '@/paraglide/messages';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/(app)/(auth)/account/settings')({
|
||||
component: RouteComponent,
|
||||
staticData: { breadcrumb: () => m.nav_settings() },
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return <div>Hello "account/settings"!</div>;
|
||||
}
|
||||
Reference in New Issue
Block a user