Skip to content

Commit

Permalink
fix: connect wallet error
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto0627 committed Apr 28, 2024
1 parent 60117c9 commit ae84b3c
Show file tree
Hide file tree
Showing 28 changed files with 458 additions and 517 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ Learn more about the power of Turborepo:
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)

# fullstack_template
34 changes: 17 additions & 17 deletions apps/serverless/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { Hono } from 'hono'
import { etag } from 'hono/etag'
import { logger } from 'hono/logger'
import { jwt } from 'hono/jwt'
import { Hono } from "hono";
import { etag } from "hono/etag";
import { logger } from "hono/logger";
import { jwt } from "hono/jwt";

const app = new Hono()
const app = new Hono();

app.use(etag(), logger())
app.use(etag(), logger());

app.get('/', (c) => {
return c.text('Hello Hono!')
})
app.get("/", (c) => {
return c.text("Hello Hono!");
});

app.use(
'/auth/*',
"/auth/*",
jwt({
secret: 'it-is-very-secret',
})
)
secret: "it-is-very-secret",
}),
);

app.get('/auth/page', (c) => {
return c.text('You are authorized')
})
app.get("/auth/page", (c) => {
return c.text("You are authorized");
});

export default app
export default app;
2 changes: 1 addition & 1 deletion apps/web/public/sw.js

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions apps/web/src/api/auth/_app.tsx

This file was deleted.

88 changes: 0 additions & 88 deletions apps/web/src/api/auth/nextauth.ts

This file was deleted.

24 changes: 12 additions & 12 deletions apps/web/src/app/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React from "react"
import React from "react";

import Image from "next/image"
import Link from "next/link"
import { Box, Typography } from "@mui/material"
import Image from "next/image";
import Link from "next/link";
import { Box, Typography } from "@mui/material";

export function Hero() {
return (
<Box className="relative w-full overflow-hidden bg-black bg-cover bg-center py-6 sm:py-12 md:py-24 lg:py-32 xl:py-48">
<Box className="flex flex-col items-center justify-between gap-x-8 px-8 sm:flex-row sm:px-12 md:px-24 lg:px-32 xl:px-48">
<Box className="flex flex-col">
<Image
src={"/konan-hero.webp"}
alt="xuedao logo"
width={300}
height={300}
priority
/>
<Image
src={"/konan-hero.webp"}
alt="xuedao logo"
width={300}
height={300}
priority
/>
<Typography className="max-w-[600px] md:text-2xl/relaxed text-gray-400">
Our mission is to break down barriers, foster global connections
among students, ignite a deep passion for learning, and promote a
Expand All @@ -34,5 +34,5 @@ export function Hero() {
</Box>
</Box>
</Box>
)
);
}
6 changes: 3 additions & 3 deletions apps/web/src/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use client"
"use client";

export * from "./hero"
export * from "./vision"
export * from "./hero";
export * from "./vision";
35 changes: 15 additions & 20 deletions apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import React from "react"
import React from "react";

import type { Metadata, Viewport } from "next"
import { Roboto } from "next/font/google"
import { Layout } from "@/components"
import "./globals.css"
import type { Metadata, Viewport } from "next";
import { Roboto } from "next/font/google";
import { Layout } from "@/components";
import "./globals.css";

import { headers } from 'next/headers'
import { headers } from "next/headers";

import { cookieToInitialState } from 'wagmi'
import { cookieToInitialState } from "wagmi";

import { config } from '@/utils/config/wagmi.config'
import Web3ModalProvider from '@/utils'
import { config } from "@/utils/config/wagmi.config";
import Web3ModalProvider from "@/utils";

const roboto = Roboto({
subsets: ["latin"],
weight: ["300", "400", "500", "700", "900"],
display: "swap",
})
});

export const metadata: Metadata = {
manifest: "/manifest.json",
Expand All @@ -25,30 +25,25 @@ export const metadata: Metadata = {
icons: {
icon: "/konan_logo.webp",
},
}
};

export const viewport: Viewport = {
themeColor: "#3367D6",
}
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
children: React.ReactNode;
}>) {
const initialState = cookieToInitialState(config, headers().get('cookie'))
return (
<html lang="en">
<head>
<link rel="shortcut icon" href="/konan_logo.webp" type="image/webp" />
</head>
<body className={roboto.className}>
<Web3ModalProvider initialState={initialState}>
<Layout>
{children}
</Layout>
</Web3ModalProvider>
<Web3ModalProvider>{children}</Web3ModalProvider>
</body>
</html>
)
);
}
6 changes: 3 additions & 3 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Navbar, Footer } from "@/components"
import { Hero, Vision } from "@/app"
import { Navbar, Footer } from "@/components";
import { Hero, Vision } from "@/app";

export default function Profile() {
return (
Expand All @@ -9,5 +9,5 @@ export default function Profile() {
<Vision />
<Footer />
</>
)
);
}
13 changes: 8 additions & 5 deletions apps/web/src/app/vision.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import React from "react";

import { AccessTime, People, Settings } from "@mui/icons-material"
import { Box, Typography } from "@mui/material"
import { AccessTime, People, Settings } from "@mui/icons-material";
import { Box, Typography } from "@mui/material";

export function Vision() {
return (
Expand All @@ -13,7 +13,10 @@ export function Vision() {
<Box className="container mx-auto px-4 md:px-6">
<Box className="flex flex-col items-center justify-center space-y-4 text-center">
<Box className="space-y-2">
<Typography variant="h3" className="text-gray-400 text-3xl font-bold sm:text-6xl">
<Typography
variant="h3"
className="text-gray-400 text-3xl font-bold sm:text-6xl"
>
How do we use celestia?
</Typography>
<Typography
Expand Down Expand Up @@ -77,5 +80,5 @@ export function Vision() {
</Box>
</Box>
</Box>
)
);
}
4 changes: 2 additions & 2 deletions apps/web/src/components/connectButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function ConnectButton() {
return <w3m-button />
}
return <w3m-button />;
}
19 changes: 11 additions & 8 deletions apps/web/src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react"
import React from "react";

import Image from "next/image"
import Link from "next/link"
import Image from "next/image";
import Link from "next/link";
import {
Instagram as InstagramIcon,
Telegram as TelegramIcon,
X as XIcon,
Facebook as FacebookIcon,
LinkedIn as LinkedInIcon,
} from "@mui/icons-material"
import { IconButton, Typography, Box } from "@mui/material"
} from "@mui/icons-material";
import { IconButton, Typography, Box } from "@mui/material";

export function Footer() {
return (
Expand Down Expand Up @@ -65,12 +65,15 @@ export function Footer() {
</IconButton>
</Box>
<Box sx={{ display: "flex", gap: 2 }}>
<Typography variant="body2" className="text-gray-400 opacity-50 hover:text-slate-300">
<Typography
variant="body2"
className="text-gray-400 opacity-50 hover:text-slate-300"
>
<Link href="/">Privacy Policy</Link>
</Typography>
</Box>
</Box>
)
);
}

export default Footer
export default Footer;
10 changes: 5 additions & 5 deletions apps/web/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client"
"use client";

export * from "./layout"
export * from "./footer"
export * from "./navbar"
export * from "./connectButton"
export * from "./layout";
export * from "./footer";
export * from "./navbar";
export * from "./connectButton";
Loading

0 comments on commit ae84b3c

Please sign in to comment.