remove head dynamic imports

pull/350/head
Tim Pechersky 2021-10-31 14:59:14 +01:00
rodzic 50908e9e7d
commit 746032936a
1 zmienionych plików z 5 dodań i 7 usunięć

Wyświetl plik

@ -6,13 +6,8 @@ import "highlight.js/styles/github.css";
import "focus-visible/dist/focus-visible"; import "focus-visible/dist/focus-visible";
import dynamic from "next/dynamic"; import dynamic from "next/dynamic";
import { QueryClient, QueryClientProvider } from "react-query"; import { QueryClient, QueryClientProvider } from "react-query";
import HeadLinks from "../src/components/HeadLinks";
const HeadSEO = dynamic(() => import("../src/components/HeadSEO"), { import HeadSEO from "../src/components/HeadSEO";
ssr: false,
});
const HeadLinks = dynamic(() => import("../src/components/HeadLinks"), {
ssr: false,
});
const AppContext = dynamic(() => import("../src/AppContext"), { const AppContext = dynamic(() => import("../src/AppContext"), {
ssr: false, ssr: false,
}); });
@ -53,6 +48,9 @@ export default function CachingApp({ Component, pageProps }) {
{ rel: "preload", as: "image", href: WHITE_LOGO_W_TEXT_URL }, { rel: "preload", as: "image", href: WHITE_LOGO_W_TEXT_URL },
]; ];
pageProps.preloads && headLinks.push(...pageProps.preloads); pageProps.preloads && headLinks.push(...pageProps.preloads);
// console.log("debugging pageProps", pageProps);
// console.log("debugging head links:", headLinks);
return ( return (
<> <>
<style global jsx>{` <style global jsx>{`