Skip to content

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

Merged
merged 25 commits into from
Jul 21, 2025
Merged

Launch section #1782

merged 25 commits into from
Jul 21, 2025

Conversation

mdev-fe
Copy link
Contributor

@mdev-fe mdev-fe commented Jul 14, 2025

No description provided.

Copy link

netlify bot commented Jul 14, 2025

Deploy Preview for vigilant-albattani-df38ec ready!

Name Link
🔨 Latest commit dfb9410
🔍 Latest deploy log https://app.netlify.com/projects/vigilant-albattani-df38ec/deploys/687a592ca1acce00087c3749
😎 Deploy Preview https://deploy-preview-1782--vigilant-albattani-df38ec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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}`);
Copy link
Contributor

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

Copy link
Collaborator

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>({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to useEffect

@@ -18,9 +20,17 @@ export default function Home(_) {
);
}, []);

const [redirectModalTo, setRedirectModalTo] = useState<string | null>(null);

const showRedirectModal = (to: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useCallback

@@ -18,9 +20,17 @@ export default function Home(_) {
);
}, []);

const [redirectModalTo, setRedirectModalTo] = useState<string | null>(null);
Copy link
Collaborator

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";
Copy link
Collaborator

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) {
Copy link
Collaborator

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";

Copy link
Collaborator

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

Copy link
Contributor Author

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})`,
Copy link
Collaborator

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;
Copy link
Collaborator

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]"
Copy link
Collaborator

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);
Copy link
Collaborator

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?

Copy link
Contributor Author

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;
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@gmxer
Copy link
Collaborator

gmxer commented Jul 14, 2025

also layout looks off on some small resolutions

Copy link

cloudflare-workers-and-pages bot commented Jul 18, 2025

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: dfb9410
Status: ✅  Deploy successful!
Preview URL: https://93b7caa2.gmx-interface.pages.dev
Branch Preview URL: https://launch-section.gmx-interface.pages.dev

View logs

@mdev-fe mdev-fe merged commit d3712c8 into redesign_homepage Jul 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants