Skip to content

Commit 8e282f4

Browse files
committed
2 parents 6a22e9e + f865adc commit 8e282f4

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

next.config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
export const reactStrictMode = false;
22
export const productionBrowserSourceMaps = true;
3-
import createBundleAnalyzer from '@next/bundle-analyzer';
3+
import createBundleAnalyzer from "@next/bundle-analyzer";
44

55
const withBundleAnalyzer = createBundleAnalyzer({
6-
enabled: process.env.ANALYZE === 'true',
6+
enabled: process.env.ANALYZE === "true",
77
});
88

9-
export default withBundleAnalyzer({});
9+
export default withBundleAnalyzer({
10+
async redirects() {
11+
return [
12+
{
13+
source: "/discord",
14+
destination: "https://discord.gg/s2VfQr69uz",
15+
permanent: false,
16+
},
17+
];
18+
},
19+
});

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/discord.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { useEffect } from "react";
2+
import Head from "next/head";
3+
4+
export default function Discord() {
5+
useEffect(() => {
6+
// Redirect to Discord server
7+
window.location.replace("https://discord.gg/s2VfQr69uz");
8+
}, []);
9+
10+
return (
11+
<>
12+
<Head>
13+
<title>Redirecting to Discord...</title>
14+
<meta
15+
httpEquiv="refresh"
16+
content="0; url=https://discord.gg/s2VfQr69uz"
17+
/>
18+
</Head>
19+
<div
20+
style={{
21+
display: "flex",
22+
justifyContent: "center",
23+
alignItems: "center",
24+
height: "100vh",
25+
fontFamily: "system-ui, -apple-system, sans-serif",
26+
}}
27+
>
28+
<p>Redirecting to Discord...</p>
29+
</div>
30+
</>
31+
);
32+
}

0 commit comments

Comments
 (0)