Skip to content

Commit 61bf127

Browse files
committed
fix: issues with blank screen on prod builds
1 parent fd02836 commit 61bf127

File tree

8 files changed

+196
-822
lines changed

8 files changed

+196
-822
lines changed

next.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
const withGraphql = require("next-plugin-graphql");
33

44
const nextConfig = {
5+
async redirects() {
6+
return [
7+
{
8+
source: "/",
9+
destination: "/drips",
10+
permanent: true,
11+
},
12+
];
13+
},
514
images: {
615
remotePatterns: [
716
{

package-lock.json

Lines changed: 152 additions & 790 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@
3737
"http-proxy": "^1.18.1",
3838
"install": "^0.13.0",
3939
"micro": "^10.0.1",
40-
"next": "^13.3.1",
40+
"next": "^13.4.8",
4141
"next-auth": "^4.19.2",
4242
"next-plugin-graphql": "^0.0.2",
4343
"npm": "^9.6.1",
4444
"prisma": "^4.9.0",
4545
"ramda": "^0.28.0",
4646
"react": "^18.2.0",
4747
"react-dom": "18.2.0",
48-
"typescript": "^4.9.5",
48+
"react-spinners": "^0.13.8",
4949
"ts-node": "^10.9.1",
50-
"react-spinners": "^0.13.8"
50+
"typescript": "^4.9.5"
5151
},
5252
"devDependencies": {
5353
"@graphql-codegen/cli": "^2.16.4",

src/app/(home)/Home.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/app/(main)/Drips.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client";
2+
import { usePathname } from "next/navigation";
3+
import Hero from "@/components/Hero";
4+
import Tabs from "@/layouts/Tabs";
5+
6+
export default function Home({ children }: { children: React.ReactNode }) {
7+
const pathname = usePathname();
8+
9+
return (
10+
<>
11+
<Hero />
12+
<Tabs.Page className="mt-8">
13+
<Tabs.Panel>
14+
<Tabs.Tab
15+
name="Past drips"
16+
href="/drips"
17+
active={pathname === "/drips"}
18+
/>
19+
<Tabs.Tab
20+
name="Your collectibles"
21+
href="/collectibles"
22+
active={pathname === "/collectibles"}
23+
/>
24+
</Tabs.Panel>
25+
<Tabs.Content>{children}</Tabs.Content>
26+
</Tabs.Page>
27+
</>
28+
);
29+
}
File renamed without changes.

src/app/(home)/page.tsx renamed to src/app/(main)/drips/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22
import { GetPastDrips } from '@/queries/airdrops.graphql';
33
import { useQuery } from '@apollo/client';
4-
import { Airdrop } from '../../graphql.types';
4+
import { Airdrop } from '@/graphql.types';
55

66
interface GetPastDripsData {
77
pastDrips: [Airdrop];
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import Home from './Home';
1+
import Drips from './Drips';
22

33
export default async function HomeLayout({
44
children
55
}: {
66
children: React.ReactNode;
77
}) {
8-
return <Home>{children}</Home>;
8+
return <Drips>{children}</Drips>;
99
}

0 commit comments

Comments
 (0)