refactor: relocate sections

This commit is contained in:
MAZE 2023-10-31 19:18:17 +03:30
parent 3ed610bb46
commit d672bf6f85
9 changed files with 17 additions and 16 deletions

View File

@ -1,9 +1,9 @@
import { Container } from '@/components/container'; import { useMemo } from 'react';
import { Container } from '@/components/container';
import { sounds } from '@/data/sounds'; import { sounds } from '@/data/sounds';
import styles from './about.module.css'; import styles from './about.module.css';
import { useMemo } from 'react';
export function About() { export function About() {
const count = useMemo(() => { const count = useMemo(() => {
@ -22,12 +22,12 @@ export function About() {
<h2 className={styles.title}>What is Moodist?</h2> <h2 className={styles.title}>What is Moodist?</h2>
<p className={styles.desc}> <p className={styles.desc}>
Moodist is your gateway to a world of serenity and focus. It&apos;s a Moodist is your gateway to a world of serenity and focus. It&apos;s a
free and registration-free online ambient sound generator offering{' '} free online ambient sound generator offering <span>{count}</span>{' '}
<span>{count}</span> handpicked sounds in various categories, from handpicked sounds in various categories, from nature&apos;s tranquil
nature&apos;s tranquil melodies to the soothing ambiance of urban melodies to the soothing ambiance of urban life. Whether you&apos;re
life. Whether you&apos;re seeking relaxation or a productivity boost, seeking relaxation or a productivity boost, Moodist lets you
Moodist lets you effortlessly customize your environment with the effortlessly customize your environment with the perfect background
perfect background sounds. sounds.
</p> </p>
</Container> </Container>
</div> </div>

View File

@ -0,0 +1,2 @@
export { About as AboutSection } from './about';
export { Why as WhySection } from './why';

View File

@ -0,0 +1 @@
export { Why } from './why';

View File

@ -1,4 +1,4 @@
.whySection { .why {
padding-bottom: 80px; padding-bottom: 80px;
& .title { & .title {

View File

@ -3,9 +3,9 @@ import { Balancer } from 'react-wrap-balancer';
import { Container } from '@/components/container'; import { Container } from '@/components/container';
import styles from './why-section.module.css'; import styles from './why.module.css';
export function WhySection() { export function Why() {
const reasons = [ const reasons = [
{ {
body: 'Moodist is a cost-free solution, offering you high-quality ambient sounds without any financial commitment.', body: 'Moodist is a cost-free solution, offering you high-quality ambient sounds without any financial commitment.',
@ -28,7 +28,7 @@ export function WhySection() {
]; ];
return ( return (
<div className={styles.whySection}> <div className={styles.why}>
<Container> <Container>
<h2 className={styles.title}>Why use Moodist?</h2> <h2 className={styles.title}>Why use Moodist?</h2>

View File

@ -1 +0,0 @@
export { WhySection } from './why-section';

View File

@ -3,15 +3,14 @@ import Layout from '@/layouts/layout.astro';
import { Hero } from '@/components/hero'; import { Hero } from '@/components/hero';
import { App } from '@/components/app'; import { App } from '@/components/app';
import { About } from '@/components/about'; import { AboutSection, WhySection } from '@/components/sections';
import { WhySection } from '@/components/why-section';
--- ---
<Layout title="Welcome to Astro."> <Layout title="Welcome to Astro.">
<main> <main>
<Hero /> <Hero />
<App client:load /> <App client:load />
<About /> <AboutSection />
<WhySection /> <WhySection />
</main> </main>
</Layout> </Layout>