-
Notifications
You must be signed in to change notification settings - Fork 389
Launch section #1782
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
Launch section #1782
Conversation
✅ Deploy Preview for vigilant-albattani-df38ec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
showRedirectModal("https://gmxsol.io/"); | ||
} else { | ||
const baseUrl = getAppBaseUrl(); | ||
showRedirectModal(`${baseUrl}/trade?${userAnalytics.getSessionIdUrlParams()}&chain=${chain}`); |
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.
jfyi only chainId
currently supported. maybe add a comment to not forget to check this on merge
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.
let's just use chainId then?
} | ||
window.location.href = to; | ||
}; | ||
userAnalytics.pushEvent<LandingPageAgreementConfirmationEvent>({ |
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.
move to useEffect
src/pages/Home/Home.tsx
Outdated
@@ -18,9 +20,17 @@ export default function Home(_) { | |||
); | |||
}, []); | |||
|
|||
const [redirectModalTo, setRedirectModalTo] = useState<string | null>(null); | |||
|
|||
const showRedirectModal = (to: string) => { |
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.
useCallback
src/pages/Home/Home.tsx
Outdated
@@ -18,9 +20,17 @@ export default function Home(_) { | |||
); | |||
}, []); | |||
|
|||
const [redirectModalTo, setRedirectModalTo] = useState<string | null>(null); |
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.
I see we have GlobalContextProvider, where you could store redirectModalTo
and setRedirectModalTo
that way you would have avoided providing showRedirectModal
everywhere, and use some useSetRedirectModalTo
instead
import { useRedirectPopupTimestamp } from "lib/useRedirectPopupTimestamp"; | ||
|
||
type Props = { | ||
chain: "arb" | "base" | "solana" | "avax" | "botanix"; |
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.
it's fine to put base and solana to sdk/src/configs/chains.ts
,
so that parameter is chainId, and you could do useGoToTrade({ chainId: ARBITRUM, ...})
to: string; | ||
}; | ||
|
||
export function RedirectModal({ onClose, to }: RedirectModalProps) { |
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.
maybe LaunchAppRedirectModal?
from the name I thought it's universal redirect notice modal, whereas it's only applicable when leaving homepage
|
||
import IcCross from "img/ic_cross.svg?react"; | ||
import IcLandingChecked from "img/ic_landing_checked.svg?react"; | ||
|
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.
would be good to use appereance transitions that we have for other modals in dapp
also ESC key doesn't close modal, which would be good to have
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.
I have asked designer about animation, waiting for him! And made ESC behavior
import { useGoToTrade } from "../LaunchSection/hooks/useGoToTrade"; | ||
|
||
const assetsBgStyle = { | ||
backgroundImage: `url(${AsssetsBg})`, |
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.
would be good to rather have backgroundType
in props, to control section backgrounds eaiser
title?: string; | ||
} | ||
>; | ||
name: string; |
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.
maybe children
instead?
return ( | ||
<button | ||
onClick={onClick} | ||
className="group inline-flex w-full items-center gap-12 rounded-16 bg-[#F4F5F9] px-20 py-12 hover:bg-[#EFF0F4] sm:w-[288px]" |
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.
would be also good to have user-select: none here
font-size: 10px; | ||
background-color: var(--main-bg-color); |
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.
won't it affect dapp?
maybe override it in a homepage specific file?
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.
that will be moved to separated file when I will separate configs and entrypoints
@@ -33,7 +31,6 @@ code { | |||
*::before, | |||
*::after { | |||
box-sizing: border-box; | |||
letter-spacing: 0.05rem; |
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.
won't it affect dapp?
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.
that will be moved to separated file when I will separate configs and entrypoints
also layout looks off on some small resolutions |
Deploying gmx-interface with
|
Latest commit: |
dfb9410
|
Status: | ✅ Deploy successful! |
Preview URL: | https://93b7caa2.gmx-interface.pages.dev |
Branch Preview URL: | https://launch-section.gmx-interface.pages.dev |
No description provided.