mirror of
https://github.com/remvze/moodist.git
synced 2025-11-02 18:47:02 -05:00
refactor: use scrollIntoView instead of link
This commit is contained in:
parent
5cfb9a8293
commit
4d2645f06c
@ -5,6 +5,12 @@ import { Container } from '@/components/container';
|
|||||||
import styles from './ready.module.css';
|
import styles from './ready.module.css';
|
||||||
|
|
||||||
export function Ready() {
|
export function Ready() {
|
||||||
|
const handleClick = () => {
|
||||||
|
const app = document.getElementById('app');
|
||||||
|
|
||||||
|
app?.scrollIntoView(true);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.ready}>
|
<div className={styles.ready}>
|
||||||
<Container>
|
<Container>
|
||||||
@ -18,9 +24,9 @@ export function Ready() {
|
|||||||
|
|
||||||
<h2 className={styles.title}>Are you ready?</h2>
|
<h2 className={styles.title}>Are you ready?</h2>
|
||||||
<p className={styles.desc}>Create your calm oasis in seconds!</p>
|
<p className={styles.desc}>Create your calm oasis in seconds!</p>
|
||||||
<a className={styles.button} href="#app">
|
<button className={styles.button} onClick={handleClick}>
|
||||||
Use Moodist
|
Use Moodist
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -12,6 +12,6 @@ import { AboutSection, WhySection, ReadySection } from '@/components/sections';
|
|||||||
<App client:load />
|
<App client:load />
|
||||||
<AboutSection />
|
<AboutSection />
|
||||||
<WhySection />
|
<WhySection />
|
||||||
<ReadySection />
|
<ReadySection client:load />
|
||||||
<Footer />
|
<Footer />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user