Skip to content
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

feat(wallet): revamped landing page #476

Merged
merged 28 commits into from
Nov 25, 2024
Merged

feat(wallet): revamped landing page #476

merged 28 commits into from
Nov 25, 2024

Conversation

DiogoSoaress
Copy link
Member

@DiogoSoaress DiogoSoaress commented Oct 10, 2024

* feat: Hero section

* fix: lint

* feat: add "Watch demo" play button

* fix: control video play

* feat: add a bottom gradient over the paused video

* styles: fix border-radius on video

* feat: temporarily use /wallet-new slug because page path  conflct with the current version

* feat: move section content back to the .json file

* fix: restore CenteredTextBlock

* Revert "fix: restore CenteredTextBlock"

This reverts commit f6a463b.
Copy link

github-actions bot commented Oct 10, 2024

Branch preview

✅ Deployed successfully in branch deployment:

https://wallet_landing_page--homepage.review.5afe.dev

@DiogoSoaress DiogoSoaress changed the title Wallet landing page feat(wallet): revamped landing page Oct 10, 2024
DiogoSoaress and others added 8 commits October 10, 2024 13:12
* feat: Hero section

* fix: lint

* feat: add "Watch demo" play button

* fix: control video play

* feat: add a bottom gradient over the paused video

* styles: fix border-radius on video

* feat: temporarily use /wallet-new slug because page path  conflct with the current version

* feat: commonCMS/Marquee

* feat: generic Card grid

* feat: declare content in wallet.json

* fix: undo unrelated change

* fix: do not render the component without `items`

* fix: remove conditional operator
* feat: Hero section

* fix: lint

* feat: add "Watch demo" play button

* fix: control video play

* feat: add a bottom gradient over the paused video

* styles: fix border-radius on video

* feat: temporarily use /wallet-new slug because page path  conflct with the current version

* feat: commonCMS/Marquee

* feat: generic Card grid

* feat: Vertical Slide

* feat: display images when clicking the cards

* fix: lint

* fix: undo unrelated changes

* feat: declare VerticalSlide content in wallet.json

* styles: mobile styles

* fix: extract expression to a variable
* feat: FeatureCards component

* feat: ecosystem projects card

* feat: rest of Featured cards

* feat: cta to wallet app

* Update src/components/Wallet/FeatureCards/index.tsx

Co-authored-by: Aaron Cook <[email protected]>

* Apply suggestions from code review

Co-authored-by: Aaron Cook <[email protected]>

---------

Co-authored-by: Aaron Cook <[email protected]>
DiogoSoaress and others added 14 commits November 5, 2024 18:25
* feat: common FAQ section

* feat: import FAQ content from CMS

* fix: undo unrelated changes
* v1.5.7

* feat: Wallet page Vertical stack

* styles: apply styles

* styles: adjust title wrapper width

* Apply suggestions from code review

Co-authored-by: Aaron Cook <[email protected]>

---------

Co-authored-by: Aaron Cook <[email protected]>
* feat: "subscribe to latest" section

* feat: display laptop image

* fix: copy changes
* feat: scroll based animation

* feat: scroll based animation in VerticalStack

* fix: handle card click

* fix: move sticky section to laptop view

* fix: ignore TS line for testing
* styles: center play button

* style: fix logos

* style: address comments on sections margins

* style: center Watch Demo button

* fix: consistent CTA copy

* style: increase card padding

* fix: stretched images

* fix: update starknet logo

* feat: replace assets
* feat: sign up form

* chore: add code to actions
@DiogoSoaress DiogoSoaress marked this pull request as ready for review November 20, 2024 14:40
Comment on lines 12 to 25
const registerEmail = (email: string) => {
fetch(PUSHWOOSH_ENDPOINT, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email,
application: process.env.NEXT_PUBLIC_PUSHWOOSH_WALLET_APPLICATION_CODE,
}),
}).catch((error) => {
console.error('Error:', error)
})
}
Copy link
Member

Choose a reason for hiding this comment

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

This is very similar to the registerEmail function found in src/components/Rewards/SignUpForm/index.tsx. What do you think about refactoring it? Not sure if we want to log either, and whether we need handle any errors thrown (not forgetting !res.ok).

label="Email:"
variant="outlined"
type="email"
name="email"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name="email"
name={FIELD_NAME}

const data = new FormData(e.target as HTMLFormElement)
const email = data.get(FIELD_NAME)

registerEmail(email as string)
Copy link
Member

Choose a reason for hiding this comment

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

Considering the usage, this should be awaited and setIsSubmitted called if no error occurs.

<div className={layoutCss.centeredContent}>
<form onSubmit={handleSubmit} className={css.form}>
<TextField
id="outlined-basic"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
id="outlined-basic"


<div className={css.secondaryText}>
By signing up to the newsletter, I confirm that I read and agree to the{' '}
<Link href="https://safe.global/privacy" target="_blank" rel="noreferrer">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Link href="https://safe.global/privacy" target="_blank" rel="noreferrer">
<Link href={AppRoutes.privacy} target="_blank" rel="noreferrer">


const offset = indexToScrollProgress(index) * sectionHeight

// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

The current version of TypeScript is missing this type value. I left a better comment and replaced the // @ts-ignore by // @ts-expect-error

@@ -45,3 +45,5 @@ export const ECOSYSTEM_DATA_URL = IS_PRODUCTION
: 'https://ecosystem-database.staging.5afe.dev'

export const COMMS_EMAIL = '[email protected]'

export const PUSHWOOSH_ENDPOINT = 'https://api.pushwoosh.com/json/1.3/registerEmail'
Copy link
Member

Choose a reason for hiding this comment

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

Nit: maybe we should name this a bit more declaratively, e.g. PUSHWOOSH_REGISTRATION_ENDPOINT

@DiogoSoaress DiogoSoaress merged commit 494b76c into main Nov 25, 2024
4 checks passed
@DiogoSoaress DiogoSoaress deleted the wallet-landing-page branch November 25, 2024 14:33
@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants