Skip to content

Commit

Permalink
βŒšοΈπŸ“Ÿ ↝ Temp fix for #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Feb 4, 2023
1 parent cf8288e commit f89c1a8
Show file tree
Hide file tree
Showing 15 changed files with 6,330 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions thirdweb-dev:sdk/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
44 changes: 44 additions & 0 deletions thirdweb-dev:sdk/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "sailors-auth-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"codegen": "graphql-codegen"
},
"dependencies": {
"@supabase/auth-helpers-nextjs": "^0.5.2",
"@supabase/auth-helpers-react": "^0.3.1",
"@supabase/auth-ui-react": "^0.2.6",
"@supabase/supabase-js": "^2.1.3",
"@thirdweb-dev/react": "^3.7.4",
"@thirdweb-dev/sdk": "^3.7.4",
"autoprefixer": "^10.4.13",
"eslint": "8.27.0",
"eslint-config-next": "13.0.2",
"javascript-time-ago": "^2.5.9",
"next": "13.0.2",
"postcss": "^8.4.18",
"react": "18.2.0",
"react-clickout-handler": "^1.2.1",
"react-dom": "18.2.0",
"react-icons": "^4.7.1",
"react-spinners": "^0.13.7",
"react-time-ago": "^7.2.1",
"tailwindcss": "^3.2.2"
},
"devDependencies": {
"@thirdweb-dev/contracts": "^3.3.0",
"@types/node": "18.11.18",
"@types/react": "^18.0.27",
"eslint": "8.30.0",
"eslint-config-next": "13.1.0",
"gray-matter": "^4.0.3",
"postcss": "^8.4.21",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.4"
}
}
54 changes: 54 additions & 0 deletions thirdweb-dev:sdk/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import type { AppProps } from "next/app";
import { useState } from "react";

/* For proposals smart contract
import { StateContextProvider } from "../context/proposals";*/
import { ThirdwebProvider, ChainId } from "@thirdweb-dev/react";
import { ThirdwebSDKProvider } from "@thirdweb-dev/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
/*import { MoralisProvider } from "react-moralis";
// Styling provider
import { ChakraProvider } from '@chakra-ui/react';
import Header from "../components/Header"; */

// For off-chain authentication (Supabase)
import { createBrowserSupabaseClient } from '@supabase/auth-helpers-nextjs';
import { SessionContextProvider, Session } from '@supabase/auth-helpers-react';

/* For threejs generator components
import 'bootstrap/dist/css/bootstrap.min.css';
import 'rc-slider/assets/index.css';
import 'rc-tooltip/assets/bootstrap.css'; */

function MyApp({ Component, pageProps }: AppProps<{
initialSession: Session, // Supabase user session
}>) {
const [supabase] = useState(() => createBrowserSupabaseClient());
const AnyComponent = Component as any;
const activeChainId = ChainId.Polygon; // Set to `.Mumbai` for testnet interaction
const queryClient = new QueryClient();

return (
<SessionContextProvider supabaseClient={supabase} initialSession={pageProps.initialSession}>
<QueryClientProvider client={queryClient}>
<ThirdwebProvider
desiredChainId={activeChainId}
authConfig={{
domain: "sailors.skinetics.tech",
authUrl: "/api/auth",
}}
>
{/*<MoralisProvider initializeOnMount={false}>
{/*<StateContextProvider>
<ChakraProvider> */}
<AnyComponent {...pageProps} />
{/*</ChakraProvider>
</StateContextProvider>
</MoralisProvider>*/}
</ThirdwebProvider>
</QueryClientProvider>
</SessionContextProvider>
)
}

export default MyApp;
13 changes: 13 additions & 0 deletions thirdweb-dev:sdk/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from 'next/document'

export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
13 changes: 13 additions & 0 deletions thirdweb-dev:sdk/pages/api/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'

type Data = {
name: string
}

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
res.status(200).json({ name: 'John Doe' })
}
9 changes: 9 additions & 0 deletions thirdweb-dev:sdk/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Head from 'next/head'
import Image from 'next/image'
import styles from '@/styles/Home.module.css'

export default function Home() {
return (
<div>Hello</div>
)
}
Binary file added thirdweb-dev:sdk/public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions thirdweb-dev:sdk/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions thirdweb-dev:sdk/public/thirteen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions thirdweb-dev:sdk/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit f89c1a8

@Gizmotronn
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#18

Please sign in to comment.