-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(airdrops): Foundational setup (#15545)
* add package.json * add .gitignore * set up eslint * set up providers * set up next config * set up public resources * set up nextjs * clean up * set up tailwind * update monorepo * update yarn.lock * update yarn.lock
- Loading branch information
Showing
18 changed files
with
271 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# next builds | ||
/src/.next | ||
.next | ||
/out | ||
.next/cache/** | ||
next-env.d.ts | ||
scripts/paywallURL.ts | ||
scripts/index.html | ||
|
||
# Sentry | ||
.sentryclirc | ||
.vercel | ||
|
||
certificates | ||
|
||
# tsbuild logs | ||
tsconfig.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
body { | ||
@apply bg-ui-secondary-200; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Inter } from 'next/font/google' | ||
import './globals.css' | ||
import { Metadata } from 'next' | ||
import Providers from '../components/providers' | ||
|
||
const inter = Inter({ | ||
subsets: ['latin'], | ||
style: ['normal'], | ||
display: 'swap', | ||
weight: ['400', '500', '600', '700'], | ||
}) | ||
|
||
export const metadata: Metadata = { | ||
icons: { | ||
icon: '/favicon.ico', | ||
}, | ||
} | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<html lang="en" className={inter.className}> | ||
<Providers> | ||
<body> | ||
<div className="overflow-hidden bg-ui-secondary-200 px-4 mx-auto lg:container"> | ||
<div className="flex flex-col gap-10 min-h-screen">{children}</div> | ||
</div> | ||
</body> | ||
</Providers> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Home() { | ||
return <div className="flex flex-col gap-10 h-full">Unlock Airdrops</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use client' | ||
|
||
import { PrivyProvider } from '@privy-io/react-auth' | ||
|
||
const Providers = ({ children }) => { | ||
return ( | ||
<PrivyProvider | ||
config={{ | ||
loginMethods: ['wallet'], | ||
}} | ||
appId="cm2oqudm203nny8z9ho6chvyv" | ||
> | ||
{children} | ||
</PrivyProvider> | ||
) | ||
} | ||
|
||
export default Providers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const unlockConfig = require('@unlock-protocol/eslint-config/next') | ||
module.exports = [ | ||
...unlockConfig, | ||
{ | ||
ignores: ['src/**/*.typegen.ts', 'tsconfig.json'], | ||
}, | ||
{ | ||
rules: { | ||
'react/no-children-prop': 'off', | ||
'no-constant-binary-expression': 'warn', | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const config = { | ||
images: { | ||
unoptimized: true, | ||
}, | ||
output: 'standalone', | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "@unlock-protocol/airdrops", | ||
"version": "0.1.0", | ||
"private": true, | ||
"peerDependencies": { | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1" | ||
}, | ||
"dependencies": { | ||
"@headlessui/react": "2.1.9", | ||
"@privy-io/react-auth": "2.2.1", | ||
"@sentry/nextjs": "8.54.0", | ||
"@tanstack/react-query": "5.59.19", | ||
"@tw-classed/react": "1.7.0", | ||
"@unlock-protocol/core": "workspace:./packages/core", | ||
"@unlock-protocol/crypto-icon": "workspace:./packages/crypto-icon", | ||
"@unlock-protocol/eslint-config": "workspace:./packages/eslint-config", | ||
"@unlock-protocol/networks": "workspace:./packages/networks", | ||
"@unlock-protocol/ui": "workspace:./packages/ui", | ||
"@unlock-protocol/unlock-js": "workspace:./packages/unlock-js", | ||
"@vercel/og": "0.6.5", | ||
"@vercel/speed-insights": "1.0.14", | ||
"dayjs": "1.11.13", | ||
"embla-carousel-react": "8.5.2", | ||
"eslint": "9.11.1", | ||
"next": "14.2.21", | ||
"react-hot-toast": "2.4.1", | ||
"tailwind-merge": "3.0.1", | ||
"typescript": "5.6.3" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "18.3.18", | ||
"@unlock-protocol/tsconfig": "workspace:./packages/tsconfig", | ||
"@vitejs/plugin-react": "4.3.4", | ||
"autoprefixer": "10.4.20", | ||
"jsdom": "26.0.0", | ||
"postcss": "8.4.49", | ||
"tailwindcss": "3.4.17", | ||
"vitest": "2.1.9" | ||
}, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build --no-lint", | ||
"deploy": "yarn build && next export -o out", | ||
"start": "yarn build && NODE_ENV=production next start", | ||
"test": "UNLOCK_ENV=test vitest run --coverage --environment=jsdom", | ||
"lint": "eslint", | ||
"ci": "yarn test && yarn lint && yarn build" | ||
}, | ||
"browserslist": [ | ||
"defaults", | ||
"not IE 11", | ||
"maintained node versions" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User-agent: * | ||
Disallow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [ | ||
'./src/**/*.{tsx,ts,jsx,js,html,mdx}', | ||
'./app/**/*.{tsx,ts,jsx,js,html,mdx}', | ||
'./components/**/*.{tsx,ts,jsx,js,html,mdx}', | ||
'./../node_modules/@unlock-protocol/ui/dist/*.{js,css}', | ||
], | ||
presets: [require('@unlock-protocol/ui/dist/unlock-tailwind-preset')], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"extends": "@unlock-protocol/tsconfig", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"jsx": "preserve", | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"noEmit": true, | ||
"incremental": true, | ||
"lib": [ | ||
"dom" | ||
], | ||
"resolveJsonModule": true, | ||
"moduleResolution": "node", | ||
"isolatedModules": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
] | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
".next/types/**/*.ts", | ||
"**/*.ts", | ||
"**/*.tsx" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters