Refactor authentication flow and improve code organization
The update implemented a redirect functionality in the multi-factor authentication flow for a better user experience. It also involved a refactoring of some parts of the code, substituting direct routing paths with path configs for easier future modifications. Import statements were adjusted for better code organization and readability.
This commit is contained in:
@@ -9,7 +9,7 @@ import Post from '~/(marketing)/blog/_components/post';
|
||||
import appConfig from '~/config/app.config';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
export function generateMetadata({
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: { slug: string };
|
||||
@@ -17,7 +17,7 @@ export function generateMetadata({
|
||||
const post = allPosts.find((post) => post.slug === params.slug);
|
||||
|
||||
if (!post) {
|
||||
return;
|
||||
notFound();
|
||||
}
|
||||
|
||||
const { title, date, description, image, slug } = post;
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { DocumentationPage } from 'contentlayer/generated';
|
||||
export interface ProcessedDocumentationPage extends DocumentationPage {
|
||||
collapsible: boolean;
|
||||
pathSegments: string[];
|
||||
nextPage: ProcessedDocumentationPage | DocumentationPage | null;
|
||||
previousPage: ProcessedDocumentationPage | DocumentationPage | null;
|
||||
nextPage: ProcessedDocumentationPage | DocumentationPage | undefined;
|
||||
previousPage: ProcessedDocumentationPage | DocumentationPage | undefined;
|
||||
children: DocsTree;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PricingTable } from '@kit/billing/components/pricing-table';
|
||||
import { PricingTable } from '@kit/billing-gateway/components';
|
||||
|
||||
import { SitePageHeader } from '~/(marketing)/_components/site-page-header';
|
||||
import billingConfig from '~/config/billing.config';
|
||||
|
||||
Reference in New Issue
Block a user