added fonts

This commit is contained in:
2025-07-02 11:28:41 +02:00
parent 4134e3a234
commit 142d2986b6
9079 changed files with 1498421 additions and 2 deletions
@@ -0,0 +1,20 @@
import { use, useContext } from 'react';
import { ServerInsertedMetadataContext } from '../../../shared/lib/server-inserted-metadata.shared-runtime';
// Receives a metadata resolver setter from the context, and will pass the metadata resolving promise to
// the context where we gonna use it to resolve the metadata, and render as string to append in <body>.
const useServerInsertedMetadata = (metadataResolver)=>{
const setMetadataResolver = useContext(ServerInsertedMetadataContext);
if (setMetadataResolver) {
setMetadataResolver(metadataResolver);
}
};
export function ServerInsertMetadata(param) {
let { promise } = param;
// Apply use() to the metadata promise to suspend the rendering in SSR.
const { metadata } = use(promise);
// Insert metadata into the HTML stream through the `useServerInsertedMetadata`
useServerInsertedMetadata(()=>metadata);
return null;
}
//# sourceMappingURL=server-inserted-metadata.js.map