Skip to content

Commit 2d62e71

Browse files
committed
solana hooks demo app
1 parent a28fa6d commit 2d62e71

File tree

21 files changed

+8082
-0
lines changed

21 files changed

+8082
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import "@rushstack/eslint-patch/modern-module-resolution";
2+
3+
module.exports = {
4+
extends: ["@toruslabs/react"],
5+
parserOptions: {
6+
parser: "@typescript-eslint/parser",
7+
ecmaVersion: 2022,
8+
sourceType: "module",
9+
project: "./tsconfig.json",
10+
},
11+
ignorePatterns: ["*.cjs", "*.mjs", "*.mts", "*.config.js", "vite.config.mts", "importLocales.js", "__generated__", ".eslintrc.js"],
12+
rules: {
13+
"@typescript-eslint/no-explicit-any": 1,
14+
"import/order": 0,
15+
"class-methods-use-this": 0,
16+
camelcase: 0,
17+
"@typescript-eslint/naming-convention": [
18+
"error",
19+
{
20+
selector: "typeLike",
21+
format: ["camelCase", "UPPER_CASE", "PascalCase"],
22+
},
23+
],
24+
"no-console": 2,
25+
"mocha/no-global-tests": ["off"],
26+
"prettier/prettier": [
27+
2,
28+
{
29+
singleQuote: false,
30+
printWidth: 150,
31+
semi: true,
32+
trailingComma: "es5",
33+
},
34+
],
35+
"import/extensions": [
36+
"error",
37+
"ignorePackages",
38+
{
39+
js: "never",
40+
jsx: "never",
41+
ts: "never",
42+
tsx: "never",
43+
},
44+
],
45+
"no-underscore-dangle": 0,
46+
"no-restricted-exports": 0,
47+
"no-param-reassign": [2, { props: false }],
48+
"vue/v-on-event-hyphenation": 0,
49+
},
50+
settings: {
51+
"import/resolver": {
52+
typescript: {
53+
project: "./tsconfig.json",
54+
},
55+
},
56+
},
57+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Web3Auth x React Demo App
2+
3+
## Quickstart
4+
5+
To use this demo app, you'll first have to build the Web3Auth packages.
6+
7+
### Build the `Web3Auth` packages
8+
9+
```bash
10+
git clone https://github.com/Web3Auth/web3auth-web.git
11+
cd web3auth-web
12+
npm install
13+
npm run bootstrap && npm run build
14+
```
15+
16+
### Start the demo app
17+
18+
> Inside `web3auth-web` directory.
19+
20+
```bash
21+
cd demo/react-app
22+
npm install
23+
npm run start
24+
# localhost:3000
25+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!--
2+
Migrate from react-app to vite by following this guide
3+
https://www.freecodecamp.org/news/how-to-migrate-from-create-react-app-to-vite/
4+
-->
5+
<!doctype html>
6+
<html lang="en">
7+
<head>
8+
<meta charset="utf-8" />
9+
<link rel="icon" href="/favicon.ico" />
10+
<meta name="viewport" content="width=device-width, initial-scale=1" />
11+
<meta name="theme-color" content="#000000" />
12+
<meta name="description" content="Web site created using create-react-app" />
13+
<link rel="apple-touch-icon" href="/logo192.png" />
14+
<!--
15+
manifest.json provides metadata used when your web app is installed on a
16+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
17+
-->
18+
<link rel="manifest" href="/manifest.json" />
19+
<script type="module">
20+
import { Buffer } from "buffer";
21+
import process from "process";
22+
// window.global ||= window;
23+
window.Buffer = Buffer;
24+
window.process = process;
25+
</script>
26+
<title>React App</title>
27+
</head>
28+
<body>
29+
<noscript>You need to enable JavaScript to run this app.</noscript>
30+
<div id="root"></div>
31+
<!--
32+
This HTML file is a template.
33+
If you open it directly in the browser, you will see an empty page.
34+
35+
You can add webfonts, meta tags, or analytics to this file.
36+
The build step will place the bundled scripts into the <body> tag.
37+
38+
To begin the development, run `npm start` or `yarn start`.
39+
To create a production bundle, use `npm run build` or `yarn build`.
40+
-->
41+
<script type="module" src="/src/index.tsx"></script>
42+
</body>
43+
</html>

0 commit comments

Comments
 (0)