-
Notifications
You must be signed in to change notification settings - Fork 10
[WIP] feat: refactor token pages #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: preview
Are you sure you want to change the base?
Conversation
Deploying with
|
| Latest commit: |
dcea078
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d483924f.frontend-3mt.pages.dev |
| Branch Preview URL: | https://refactor-refactormarketsandt.frontend-3mt.pages.dev |
pyk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error in build:
14:00:01.457 | https://nextjs.org/telemetry
-- | --
14:00:01.457 |
14:00:01.588 | info - Checking validity of types...
14:00:10.414 | Failed to compile.
14:00:10.414 |
14:00:10.414 | ./pages/[chains]/markets/[token].tsx:13:32
14:00:10.414 | Type error: Cannot find module '../../../modules/tokenPage/tokenContainer' or its corresponding type declarations.
14:00:10.415 |
14:00:10.415 | �[0m �[90m 11 \| �[39m�[36mimport�[39m { useRouter } from �[32m"next/router"�[39m�[33m;�[39m�[0m
14:00:10.415 | �[0m �[90m 12 \| �[39m�[36mimport�[39m �[33mReact�[39m�[33m,�[39m { useEffect�[33m,�[39m useMemo } from �[32m"react"�[39m�[33m;�[39m�[0m
14:00:10.415 | �[0m�[31m�[1m>�[22m�[39m�[90m 13 \| �[39m�[36mimport�[39m { �[33mTokenContainer�[39m } from �[32m"../../../modules/tokenPage/tokenContainer"�[39m�[33m;�[39m�[0m
14:00:10.415 | �[0m �[90m \| �[39m �[31m�[1m^�[22m�[39m�[0m
14:00:10.415 | �[0m �[90m 14 \| �[39m�[36mimport�[39m �[33mNavigation�[39m from �[32m"../../../components/v1/Navigation"�[39m�[33m;�[39m�[0m
14:00:10.415 | �[0m �[90m 15 \| �[39m�[36mimport�[39m { useTokenStore } from �[32m"../../../modules/tokenPage/store/tokenStore"�[39m�[33m;�[39m�[0m
14:00:10.415 | �[0m �[90m 16 \| �[39m�[0m
14:00:10.449 | Failed: build command exited with code: 1
14:00:11.639 | Failed: an internal error occurred
| export function useLeveragedTokenNAV(req: LeveragedTokenNAVRequest) { | ||
| const { data, error } = useSWR<ethers.BigNumber, Error>( | ||
| export function useLeveragedTokenNAV(req: LeveragedTokenNAVRequest, options?: SWRConfiguration) { | ||
| const { data, error, mutate } = useSWR<ethers.BigNumber, Error>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need mutate ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because i want to re-fetch data when error appears
| balanceResponse.mutate(); | ||
| }; | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we have multiples useEffect() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it's specific usage.
this side effect will only run when dependencies changes value
because i think if you combine them , it may create unexpected re-render and side effect
46f81e7 to
dcea078
Compare
Refactor token pages