From 60f85c43a217bcc62e93c9595126c576ce26ff19 Mon Sep 17 00:00:00 2001 From: chandrakumarreddy Date: Sun, 5 Jun 2022 23:39:43 +0530 Subject: [PATCH] connect to wallet --- my-app/.eslintrc | 6 + my-app/.gitignore | 32 + my-app/README.md | 34 + my-app/jsconfig.json | 5 + my-app/next.config.js | 6 + my-app/package.json | 21 + my-app/pages/_app.js | 16 + my-app/pages/api/hello.js | 5 + my-app/pages/index.js | 107 ++ my-app/public/favicon.ico | Bin 0 -> 25931 bytes my-app/public/vercel.svg | 4 + my-app/styles/Home.module.css | 53 + my-app/styles/global.css | 59 + my-app/yarn.lock | 2003 +++++++++++++++++++++++++++++++++ 14 files changed, 2351 insertions(+) create mode 100644 my-app/.eslintrc create mode 100644 my-app/.gitignore create mode 100644 my-app/README.md create mode 100644 my-app/jsconfig.json create mode 100644 my-app/next.config.js create mode 100644 my-app/package.json create mode 100644 my-app/pages/_app.js create mode 100644 my-app/pages/api/hello.js create mode 100644 my-app/pages/index.js create mode 100644 my-app/public/favicon.ico create mode 100644 my-app/public/vercel.svg create mode 100644 my-app/styles/Home.module.css create mode 100644 my-app/styles/global.css create mode 100644 my-app/yarn.lock diff --git a/my-app/.eslintrc b/my-app/.eslintrc new file mode 100644 index 0000000..2bad790 --- /dev/null +++ b/my-app/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": ["next/core-web-vitals"], + "rules": { + "@next/next/no-img-element": "off" + } +} diff --git a/my-app/.gitignore b/my-app/.gitignore new file mode 100644 index 0000000..55175ef --- /dev/null +++ b/my-app/.gitignore @@ -0,0 +1,32 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel diff --git a/my-app/README.md b/my-app/README.md new file mode 100644 index 0000000..b12f3e3 --- /dev/null +++ b/my-app/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/my-app/jsconfig.json b/my-app/jsconfig.json new file mode 100644 index 0000000..36aa1a4 --- /dev/null +++ b/my-app/jsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "baseUrl": "." + } +} diff --git a/my-app/next.config.js b/my-app/next.config.js new file mode 100644 index 0000000..a843cbe --- /dev/null +++ b/my-app/next.config.js @@ -0,0 +1,6 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, +} + +module.exports = nextConfig diff --git a/my-app/package.json b/my-app/package.json new file mode 100644 index 0000000..456bbae --- /dev/null +++ b/my-app/package.json @@ -0,0 +1,21 @@ +{ + "name": "my-app", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev --port=8000", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "next": "12.1.6", + "react": "18.1.0", + "react-dom": "18.1.0", + "web3modal": "^1.9.7" + }, + "devDependencies": { + "eslint": "8.17.0", + "eslint-config-next": "12.1.6" + } +} diff --git a/my-app/pages/_app.js b/my-app/pages/_app.js new file mode 100644 index 0000000..7b2fbd0 --- /dev/null +++ b/my-app/pages/_app.js @@ -0,0 +1,16 @@ +import "../styles/global.css"; +import Script from "next/script"; + +function MyApp({ Component, pageProps }) { + return ( + <> + +