This commit covers a variety of actions that includes the refactoring of the authentication components to accept paths and invite tokens as props instead of a singular callback prop, thereby improving the component's flexibility. This refactor process removes 'withI18n' calls as i18n functionalities are no longer used. The commit also contains several adjustments to the UI components, including the authorization layout, pricing table, and sign-up page. It also includes minor changes to error messages, specifically those related to password resetting. Lastly, several peer dependencies are removed in the 'package.json' files and changes made to the 'browser.client.ts' file providing a significant code cleanup.
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import { z } from 'zod';
|
|
|
|
const PathsSchema = z.object({
|
|
auth: z.object({
|
|
signIn: z.string().min(1),
|
|
signUp: z.string().min(1),
|
|
verifyMfa: z.string().min(1),
|
|
callback: z.string().min(1),
|
|
passwordReset: z.string().min(1),
|
|
passwordUpdate: z.string().min(1),
|
|
}),
|
|
app: z.object({
|
|
home: z.string().min(1),
|
|
personalAccountSettings: z.string().min(1),
|
|
personalAccountBilling: z.string().min(1),
|
|
personalAccountBillingReturn: z.string().min(1),
|
|
accountHome: z.string().min(1),
|
|
accountSettings: z.string().min(1),
|
|
accountBilling: z.string().min(1),
|
|
accountMembers: z.string().min(1),
|
|
accountBillingReturn: z.string().min(1),
|
|
}),
|
|
});
|
|
|
|
const pathsConfig = PathsSchema.parse({
|
|
auth: {
|
|
signIn: '/auth/sign-in',
|
|
signUp: '/auth/sign-up',
|
|
verifyMfa: '/auth/verify',
|
|
callback: '/auth/callback',
|
|
passwordReset: '/auth/password-reset',
|
|
passwordUpdate: '/update-password',
|
|
},
|
|
app: {
|
|
home: '/home',
|
|
personalAccountSettings: '/home/settings',
|
|
personalAccountBilling: '/home/billing',
|
|
personalAccountBillingReturn: '/home/billing/return',
|
|
accountHome: '/home/[account]',
|
|
accountSettings: `/home/[account]/settings`,
|
|
accountBilling: `/home/[account]/billing`,
|
|
accountMembers: `/home/[account]/members`,
|
|
accountBillingReturn: `/home/[account]/billing/return`,
|
|
},
|
|
});
|
|
|
|
export default pathsConfig;
|