forked from github/plane
1e152c666c
* chore: moved app & space from apps to root * chore: modified workspace configuration * chore: modified dockerfiles for space and web * chore: modified icons for space * feat: updated files for new svg icons supported by next-images * chore: added /spaces base path for next * chore: added compose config for space * chore: updated husky configuration * chore: updated workflows for new configuration * chore: changed app name to web * fix: resolved build errors with web * chore: reset file tracing root for both projects * chore: added nginx config for deploy * fix: eslint and tsconfig settings for space app * husky setup fixes based on new dir * eslint fixes * prettier formatting --------- Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import Document, { Html, Head, Main, NextScript } from "next/document";
|
|
|
|
class MyDocument extends Document {
|
|
render() {
|
|
const isSessionRecorderEnabled = parseInt(
|
|
process.env.NEXT_PUBLIC_ENABLE_SESSION_RECORDER || "0"
|
|
);
|
|
|
|
return (
|
|
<Html>
|
|
<Head>
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<link rel="apple-touch-icon" href="/icon.png" />
|
|
<meta name="theme-color" content="#fff" />
|
|
{process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN && (
|
|
<script
|
|
defer
|
|
data-domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
|
|
src="https://plausible.io/js/script.js"
|
|
/>
|
|
)}
|
|
<script defer src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2" />
|
|
{isSessionRecorderEnabled && process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY && (
|
|
<script
|
|
defer
|
|
dangerouslySetInnerHTML={{
|
|
__html: `(function(c,l,a,r,i,t,y){
|
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
|
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
|
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
|
})(window, document, "clarity", "script", "${process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY}");`,
|
|
}}
|
|
/>
|
|
)}
|
|
</Head>
|
|
<body>
|
|
<Main />
|
|
<NextScript />
|
|
</body>
|
|
</Html>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default MyDocument;
|