Next.js 16, React 19.2, Identities page, Invitations identities step, PNPM Catalogs (#381)
* Upgraded to Next.js 16 * Refactored code to comply with React 19.2 ESLint rules * Refactored some useEffect usages with the new useEffectEvent * Added Identities page and added second step to set up an identity after accepting an invitation * Updated all dependencies * Introduced PNPM catalogs for some frequently updated dependencies * Bugs fixing and improvements
This commit is contained in:
committed by
GitHub
parent
ea0c1dde80
commit
2c0d0bf7a1
39
apps/web/lib/root-metadata.ts
Normal file
39
apps/web/lib/root-metadata.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Metadata } from 'next';
|
||||
|
||||
import { headers } from 'next/headers';
|
||||
|
||||
import appConfig from '~/config/app.config';
|
||||
|
||||
/**
|
||||
* @name generateRootMetadata
|
||||
* @description Generates the root metadata for the application
|
||||
*/
|
||||
export const generateRootMetadata = async (): Promise<Metadata> => {
|
||||
const headersStore = await headers();
|
||||
const csrfToken = headersStore.get('x-csrf-token') ?? '';
|
||||
|
||||
return {
|
||||
title: appConfig.title,
|
||||
description: appConfig.description,
|
||||
metadataBase: new URL(appConfig.url),
|
||||
applicationName: appConfig.name,
|
||||
other: {
|
||||
'csrf-token': csrfToken,
|
||||
},
|
||||
openGraph: {
|
||||
url: appConfig.url,
|
||||
siteName: appConfig.name,
|
||||
title: appConfig.title,
|
||||
description: appConfig.description,
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title: appConfig.title,
|
||||
description: appConfig.description,
|
||||
},
|
||||
icons: {
|
||||
icon: '/images/favicon/favicon.ico',
|
||||
apple: '/images/favicon/apple-touch-icon.png',
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user