-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gas-station): update the gas stations information (#471)
* feat: update the gas stations information * chore: update thumbnail
- Loading branch information
1 parent
4925ccb
commit 51cea4a
Showing
11 changed files
with
54 additions
and
45 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,32 @@ | ||
import { Button, Container, SvgIcon, Typography } from '@mui/material' | ||
import { Button, Container, Typography } from '@mui/material' | ||
import type { BaseBlock } from '@/components/Home/types' | ||
import layoutCss from '@/components/common/styles.module.css' | ||
import SafeLink from '@/components/common/SafeLink' | ||
import { xSharingUrl } from '@/lib/xSharingUrl' | ||
import XIcon from '@/public/images/x-icon.svg' | ||
import useCurrentUrl from '@/hooks/useCurrentUrl' | ||
import Slider from '@/components/GasStation/Slider' | ||
import clsx from 'clsx' | ||
import css from './styles.module.css' | ||
|
||
const socialMsg = 'Just checked out the @safe {Core} Gas Station ⛽️ with gas credits worth $250k' | ||
|
||
const TwitterCTA = ({ title, text }: BaseBlock) => { | ||
const currentUrl = useCurrentUrl() | ||
|
||
const xUrl = xSharingUrl(currentUrl, socialMsg) | ||
|
||
return ( | ||
<> | ||
<Container className={`${layoutCss.containerShort} ${css.container}`}> | ||
<Typography variant="h2" className={css.title}> | ||
{title} | ||
</Typography> | ||
|
||
<SafeLink href={xUrl}> | ||
<Button variant="contained" size="large" className={css.button}> | ||
Share on | ||
<SvgIcon component={XIcon} fontSize="inherit" inheritViewBox /> | ||
</Button> | ||
</SafeLink> | ||
</Container> | ||
|
||
<div className={css.sliderWrapper}> | ||
<div className={css.gradientBase} /> | ||
|
||
<Slider text={text} /> | ||
|
||
<div className={clsx(css.gradientBase, css.gradientFlipped)} /> | ||
</div> | ||
</> | ||
) | ||
} | ||
const TwitterCTA = ({ title, text, link }: BaseBlock) => ( | ||
<> | ||
<Container className={`${layoutCss.containerShort} ${css.container}`}> | ||
<Typography variant="h2" className={css.title}> | ||
{title} | ||
</Typography> | ||
|
||
{link && ( | ||
<Button key={link.href} href={link.href} target="_blank" rel="noreferrer" variant="contained" size="large"> | ||
{link.title} | ||
</Button> | ||
)} | ||
</Container> | ||
|
||
<div className={css.sliderWrapper}> | ||
<div className={css.gradientBase} /> | ||
|
||
<Slider text={text} /> | ||
|
||
<div className={clsx(css.gradientBase, css.gradientFlipped)} /> | ||
</div> | ||
</> | ||
) | ||
|
||
export default TwitterCTA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters