Allow adding custom javascript to the page. Closes #2604

This commit is contained in:
Gabe Kangas
2023-01-18 22:38:24 -08:00
parent 053a33ac47
commit 19c228eaf6
15 changed files with 211 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import Head from 'next/head';
import { FC, useEffect, useRef } from 'react';
import { Layout } from 'antd';
import dynamic from 'next/dynamic';
import Script from 'next/script';
import {
ClientConfigStore,
isChatAvailableSelector,
@ -133,6 +134,8 @@ export const Main: FC = () => {
<PushNotificationServiceWorker />
<TitleNotifier name={name} />
<Theme />
<Script strategy="afterInteractive" src="/customjavascript" />
<Layout ref={layoutRef} className={styles.layout}>
<Header name={title || name} chatAvailable={isChatAvailable} chatDisabled={chatDisabled} />
<Content />