-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,462 additions
and
67 deletions.
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,23 @@ | ||
# rivet key for rpc calls, you can also pass in custom rpcs to many components | ||
VITE_RIVET_KEY= | ||
|
||
# add your graph api key if using mainnet or gnosischain | ||
VITE_GRAPH_API_KEY_MAINNET= | ||
|
||
# key from wallet connect is required | ||
VITE_WALLET_CONNECT_ID= | ||
|
||
# optional will use rate limited if not set | ||
VITE_OPTIMISM_ALCHEMY_KEY= | ||
VITE_ARBITRUM_ALCHEMY_KEY= | ||
VITE_POLYGONPOS_ALCHEMY_KEY= | ||
|
||
# add blockexplorer api keys for any supported networks | ||
VITE_ETHERSCAN_KEY= | ||
VITE_ARBISCAN_KEY= | ||
VITE_GNOSISSCAN_KEY= | ||
VITE_POLYGONSCAN_KEY= | ||
VITE_OPTIMISMSCAN_KEY= | ||
|
||
# corresponds to keys in targetDao.ts if scoping app to a single dao | ||
VITE_TARGET_KEY= |
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
.env |
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 |
---|---|---|
@@ -1,27 +1,9 @@ | ||
# React + TypeScript + Vite | ||
# HAUS TWA SANDBOX | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
Playing with DAOhaus v3 and Telegram Mini Apps. | ||
|
||
Currently, two official plugins are available: | ||
#### Reference | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
[TON TWA Tutorial](https://docs.ton.org/develop/dapps/telegram-apps/app-examples#modern-tma-example) | ||
|
||
## Expanding the ESLint configuration | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
|
||
```js | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json', './tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
``` | ||
|
||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` | ||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list | ||
[TWA SDK](https://github.com/twa-dev/SDK) |
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
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
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ a { | |
} | ||
a:hover { | ||
color: #535bf2; | ||
cursor: pointer; | ||
} | ||
|
||
body { | ||
|
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import WebApp from "@twa-dev/sdk"; | ||
import { QueryClient, QueryClientProvider } from "react-query"; | ||
|
||
import App from "./App.tsx"; | ||
import "./index.css"; | ||
|
||
WebApp.ready(); | ||
|
||
const queryClient = new QueryClient(); | ||
|
||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<App /> | ||
<QueryClientProvider client={queryClient}> | ||
<App /> | ||
</QueryClientProvider> | ||
</React.StrictMode> | ||
); |
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
Oops, something went wrong.