Change: use Script component instead of async script for custom.js (#2901)

pull/2891/head
Benedek Kozma 3 months ago committed by GitHub
parent 87d1ea4f2e
commit ea0310548a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,6 +1,7 @@
/* eslint-disable react/no-array-index-key */ /* eslint-disable react/no-array-index-key */
import useSWR, { SWRConfig } from "swr"; import useSWR, { SWRConfig } from "swr";
import Head from "next/head"; import Head from "next/head";
import Script from "next/script";
import dynamic from "next/dynamic"; import dynamic from "next/dynamic";
import classNames from "classnames"; import classNames from "classnames";
import { useTranslation } from "next-i18next"; import { useTranslation } from "next-i18next";
@ -401,8 +402,7 @@ function Home({ initialSettings }) {
emptyValue="/* No custom CSS */" emptyValue="/* No custom CSS */"
/> />
</style> </style>
<link rel="preload" href="/api/config/custom.js" as="fetch" crossOrigin="anonymous" /> <Script src="/api/config/custom.js" />
<script data-name="custom.js" src="/api/config/custom.js" async />
<div className="relative container m-auto flex flex-col justify-start z-10 h-full"> <div className="relative container m-auto flex flex-col justify-start z-10 h-full">
<QuickLaunch <QuickLaunch

Loading…
Cancel
Save