-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add screenshots to front page carousel #414
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Alex Sørlie Glomsaas <[email protected]>
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.
If we want new images, fine, but the intention was never to just continue adding.
If we want a new rotation, replace the old set with a new set of the same count, or implement a way for there to be a subset of a larger list which rotates at an interval (maybe a daily one).
In any event, I don't want this to continue expanding infinitely. all of these images are pre-loaded onto the user's machine in the background, and the UI gets more cluttered with the image picker the more you add. Stick to 5-8 at a time
function FuelRatsHome(props) { | ||
const { authenticate, ...restQuery } = props.query | ||
const dispatch = useDispatch() | ||
|
||
useEffect(() => { | ||
if (authenticate) { | ||
dispatch(setFlag('showLoginDialog', true)) | ||
Router.replace(makeRoute('/', restQuery), undefined, { shallow: true }) | ||
} | ||
// eslint-disable-next-line react-hooks/exhaustive-deps -- only run on authenticate change, we only care about the state of others when this value changes anyway. | ||
}, [authenticate]) | ||
|
||
return ( | ||
<section className="hero"> | ||
<Carousel id="HomeImages" slides={CarouselSlides} /> | ||
|
||
<header> | ||
<h1>{'We Have Fuel. '}<wbr />{"You\u00a0Don't."}</h1> | ||
<h2>{'Any Questions?'}</h2> | ||
</header> | ||
|
||
<footer className="call-to-action"> | ||
<Link href="/i-need-fuel"> | ||
<a className="button tall">{'Get Fuel'}</a> | ||
</Link> | ||
</footer> | ||
</section> | ||
) | ||
} | ||
|
||
FuelRatsHome.getPageMeta = () => { | ||
return { | ||
noHeader: true, | ||
title: 'Home', | ||
key: 'home', | ||
} | ||
return { | ||
noHeader: true, | ||
title: 'Home', | ||
key: 'home', | ||
} | ||
} |
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.
Please revert these indentation changes. I think your editor squeaked this up.
Closes #[issue]
Changelog
✨ Additions
Additional Information
Contributor's Checklist
yarn lint
and confirmed there are no errors or warnings.CONTRIBUTING.md
.Maintainer's Checklist
CHANGELOG.md
.