Skip to content

Commit

Permalink
Feat/add gpu credit page (#12)
Browse files Browse the repository at this point in the history
* feat: mock ui

* feat: add UI before connect github header

feat: add UI after connected github

feat: add UI for header after connected github

feat: add logic store code when connected to github

feat: add redirect page when connected Github

feat: add csrf token when connected Github

feat: add logout with github

feat: add redirect to origin page when connect github

* refactor: remove duplicate icon

* feat: add login by github function

- refactor cumbersome file names

* feat(gpu credit): integrate with apis

* feat: add api check credit balance

- sync refresh token into 1 request

* feat: add error handle for login failed

* feat: add error message when query failed

* feat: add env vars for github login

---------

Co-authored-by: ledanghuy1811 <[email protected]>
  • Loading branch information
quanpt239 and ledanghuy1811 authored Sep 13, 2024
1 parent bc36742 commit 4d17d82
Show file tree
Hide file tree
Showing 35 changed files with 1,297 additions and 43 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ REACT_APP_BASE_API_URL=https://api.oraidex.io

REACT_APP_KADO_API_KEY=df0d2b3f-d829-4453-a4f6-1d6e8870e8f4
REACT_APP_MIX_PANEL_ENVIRONMENT=acbafd21a85654933cbb0332c5a6f4f8
REACT_APP_STRAPI_BASE_URL=https://nice-fireworks-d26703b63e.strapiapp.com
REACT_APP_STRAPI_BASE_URL=https://nice-fireworks-d26703b63e.strapiapp.com

REACT_APP_GITHUB_CLIENT_ID=Ov23liRkvPuKiJCYPmXi
REACT_APP_BASE_GPU_API_URL=https://api-gpu-hub.orai.io
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@sentry/react": "^7.47.0",
"@tanstack/react-query": "^4.32.6",
"@tharsis/proto": "^0.1.17",
"@tippyjs/react": "^4.2.0",
"@tippyjs/react": "^4.2.6",
"@walletconnect/browser-utils": "^1.8.0",
"@walletconnect/ethereum-provider": "^1.7.8",
"axios": "^0.26.1",
Expand All @@ -33,7 +33,9 @@
"big-integer": "^1.6.52",
"bitcoin-units": "^1.0.0",
"chain-registry": "^1.63.86",
"chart.js": "^4.4.4",
"classnames": "^2.2.6",
"dotenv": "^16.4.5",
"ethers": "^5.0.15",
"idb-keyval": "^6.2.1",
"lightweight-charts": "^4.1.3",
Expand All @@ -43,6 +45,7 @@
"qr-code-styling": "1.6.0-rc.1",
"qrcode": "^1.5.3",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.1.1",
"react-modal": "^3.16.1",
Expand Down
10 changes: 10 additions & 0 deletions src/assets/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/gpu_credit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 4 additions & 9 deletions src/assets/icons/gpu_staking.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/logout-git.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/nav-arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/bg-gpu-credit-balance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/connected-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/flicker-dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/jupyterhub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4d17d82

Please sign in to comment.