Skip to content

Commit d52f352

Browse files
committed
Merge branch 'main' into anshul/rust_airdrop
2 parents f561377 + 61bf127 commit d52f352

File tree

8 files changed

+193
-139
lines changed

8 files changed

+193
-139
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: 150 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"http-proxy": "^1.18.1",
3939
"install": "^0.13.0",
4040
"micro": "^10.0.1",
41-
"next": "^13.3.1",
42-
"next-auth": "^4.22.1",
41+
"next": "^13.4.8",
42+
"next-auth": "^4.19.2",
4343
"next-plugin-graphql": "^0.0.2",
4444
"npm": "^9.6.1",
4545
"prisma": "^4.9.0",

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)