From 4838df315931bb883f704ec3e1abe2685f296cdf Mon Sep 17 00:00:00 2001
From: HsiangNianian <admin@jyunko.cn>
Date: Sat, 22 Apr 2023 19:52:26 +0800
Subject: 😀
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 docs/pages/_app.tsx | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 docs/pages/_app.tsx

(limited to 'docs/pages/_app.tsx')

diff --git a/docs/pages/_app.tsx b/docs/pages/_app.tsx
new file mode 100644
index 0000000..fc61810
--- /dev/null
+++ b/docs/pages/_app.tsx
@@ -0,0 +1,47 @@
+import "../styles.css";
+import "../custom.css";
+
+import { SSRProvider } from "@react-aria/ssr";
+import type { AppProps } from "next/app";
+import type { ReactNode } from "react";
+import { Analytics } from "@vercel/analytics/react";
+
+type NextraAppProps = AppProps & {
+  Component: AppProps["Component"] & {
+    getLayout: (page: ReactNode) => ReactNode;
+  };
+};
+
+// Shim requestIdleCallback in Safari
+if (typeof window !== "undefined" && !("requestIdleCallback" in window)) {
+  window.requestIdleCallback = (fn) => setTimeout(fn, 1);
+  window.cancelIdleCallback = (e) => clearTimeout(e);
+}
+
+export default function Nextra({ Component, pageProps }: NextraAppProps) {
+  return (
+    <SSRProvider>
+      <>
+        {/**
+         * Globally defined svg linear gradient, for use in icons
+         */}
+        <svg height="0px" width="0px">
+          <defs>
+            <linearGradient
+              id="pink-gradient"
+              x1="0%"
+              y1="0%"
+              x2="100%"
+              y2="100%"
+            >
+              <stop offset="0%" stopColor="rgba(156, 81, 161, 1)" />
+              <stop offset="70%" stopColor="rgba(255, 30, 86, 1)" />
+            </linearGradient>
+          </defs>
+        </svg>
+      </>
+      <Component {...pageProps} />
+      <Analytics />
+    </SSRProvider>
+  );
+}
-- 
cgit v1.2.3-70-g09d2

