Files
ncd-fe/packages/nicolium/src/precheck.ts
nicole mikołajczyk b88a638e25 nicolium rename stuff
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-27 01:04:14 +01:00

16 lines
561 B
TypeScript

/**
* Precheck: information about the site before anything renders.
* @module @/precheck
*/
/** Whether pre-rendered data exists in Pleroma's format. */
const hasPrerenderPleroma = Boolean(document.getElementById('initial-results'));
/** Whether pre-rendered data exists in Mastodon's format. */
const hasPrerenderMastodon = Boolean(document.getElementById('initial-state'));
/** Whether initial data was loaded into the page by server-side-rendering (SSR). */
const isPrerendered = hasPrerenderPleroma || hasPrerenderMastodon;
export { isPrerendered };