From 9f63e2f1c35a40d3ff0bdfd1a2870270bf9ba242 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sun, 29 Sep 2024 02:20:16 -0300 Subject: [PATCH 1/3] [feat] :fire: remove dead code --- src/layouts/main/header.tsx | 1 - src/routes/paths.ts | 19 +------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/layouts/main/header.tsx b/src/layouts/main/header.tsx index e3b0b91..c6bcbbd 100644 --- a/src/layouts/main/header.tsx +++ b/src/layouts/main/header.tsx @@ -11,7 +11,6 @@ import { useResponsive } from 'src/hooks/use-responsive' import { bgBlur } from 'src/theme/css' import { useTranslate } from 'src/locales' -import { PATH_AFTER_LOGIN } from 'src/config-global' import Logo from 'src/components/logo' import Iconify from 'src/components/iconify' diff --git a/src/routes/paths.ts b/src/routes/paths.ts index f0e772c..360a8bd 100644 --- a/src/routes/paths.ts +++ b/src/routes/paths.ts @@ -1,6 +1,5 @@ const ROOTS = { - AUTH: '/auth', - AUTH_DEMO: '/auth-demo', + AUTH: 'https://chatterpay.net/auth', DASHBOARD: '/dashboard' } @@ -18,22 +17,6 @@ export const paths = { register: `${ROOTS.AUTH}/jwt/register` } }, - authDemo: { - classic: { - login: `${ROOTS.AUTH_DEMO}/classic/login`, - register: `${ROOTS.AUTH_DEMO}/classic/register`, - forgotPassword: `${ROOTS.AUTH_DEMO}/classic/forgot-password`, - newPassword: `${ROOTS.AUTH_DEMO}/classic/new-password`, - verify: `${ROOTS.AUTH_DEMO}/classic/verify` - }, - modern: { - login: `${ROOTS.AUTH_DEMO}/modern/login`, - register: `${ROOTS.AUTH_DEMO}/modern/register`, - forgotPassword: `${ROOTS.AUTH_DEMO}/modern/forgot-password`, - newPassword: `${ROOTS.AUTH_DEMO}/modern/new-password`, - verify: `${ROOTS.AUTH_DEMO}/modern/verify` - } - }, dashboard: { root: `${ROOTS.DASHBOARD}`, nfts: { From 58b9e32b4de35a3de44298a84d517b5133055181 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sun, 29 Sep 2024 02:20:42 -0300 Subject: [PATCH 2/3] [chore] :fire: remove unused script --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 24d952f..32e8002 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "build": "next build", "create-env": "printenv > .env", "serve": "yarn build && npm i -g http-server && http-server ./.next", - "export": "yarn build && next export -o _static", "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"", "lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"", "prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", From e5e2a47243b05c6187e973e1bd9a220dd85375bb Mon Sep 17 00:00:00 2001 From: dappsar Date: Sun, 29 Sep 2024 02:22:14 -0300 Subject: [PATCH 3/3] [refactor] :recycle: refactor icp handle urls --- src/config-global.ts | 7 ++----- src/layouts/common/login-button.tsx | 14 ++++++++------ src/routes/paths.ts | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/config-global.ts b/src/config-global.ts index 18414af..c358c8a 100644 --- a/src/config-global.ts +++ b/src/config-global.ts @@ -1,5 +1,3 @@ -import { paths } from 'src/routes/paths' - import { Network } from './types/networks' // ---------------------------------------------------------------------- @@ -31,7 +29,7 @@ export const handleVercelFreePlanTimeOut = export const UI_API_URL = process.env.NEXT_PUBLIC_UI_URL export const USE_MOCK = (process.env.NEXT_PUBLIC_USE_MOCK || 'true') === 'true' export const ALLOWED_ORIGINS = process.env.NEXT_PUBLIC_ALLOWED_ORIGINS || '*' -export const fromICP = (process.env.NEXT_PUBLIC_FROM_ICP || 'false') === 'true' +export const fromICP = (process.env.NEXT_PUBLIC_FROM_ICP || 'true') === 'true' export const RECAPTCHA_SITE_KEY = process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY || '' export const NFT_IMAGE_REPOSITORY = ( process.env.NEXT_PUBLIC_NFT_IMAGE_REPOSITORY || 'gcp' @@ -39,8 +37,7 @@ export const NFT_IMAGE_REPOSITORY = ( // ---------------------------------------------------------------------- // internal -export const DOMAIN_TO_USE_WITH_ICP = fromICP ? 'https://chatterpay.net' : '' -export const PATH_AFTER_LOGIN = `${DOMAIN_TO_USE_WITH_ICP}$/dashboard` +export const PATH_AFTER_LOGIN = `/dashboard` export const BOT_WAPP_URL = 'https://api.whatsapp.com/send/?phone=5491164629653&text=MESSAGE&type=phone_number&app_absent=0' diff --git a/src/layouts/common/login-button.tsx b/src/layouts/common/login-button.tsx index 10295b8..6035e77 100644 --- a/src/layouts/common/login-button.tsx +++ b/src/layouts/common/login-button.tsx @@ -5,6 +5,7 @@ import { paths } from 'src/routes/paths' import { RouterLink } from 'src/routes/components' import { useTranslate } from 'src/locales' +import { fromICP } from 'src/config-global' // ---------------------------------------------------------------------- @@ -18,18 +19,19 @@ export default function LoginButton({ sx }: Props) { return ( <> - diff --git a/src/routes/paths.ts b/src/routes/paths.ts index 360a8bd..ecbfb2c 100644 --- a/src/routes/paths.ts +++ b/src/routes/paths.ts @@ -1,5 +1,5 @@ const ROOTS = { - AUTH: 'https://chatterpay.net/auth', + AUTH: '/auth', DASHBOARD: '/dashboard' }