Skip to content

Commit

Permalink
feat(index.astro): load configuration dynamically using getConfig fun…
Browse files Browse the repository at this point in the history
…ction to enhance flexibility

refactor(index.astro): pass config to UserContainer and ButtonContainer for improved component functionality
  • Loading branch information
keksiqc committed Nov 4, 2024
1 parent 492b00a commit 7ff5041
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { ButtonContainer } from '@/components/ButtonContainer'
import { Footer } from '@/components/Footer'
import { ModeToggle } from '@/components/ModeToggle'
import { UserContainer } from '@/components/UserContainer'
import { getConfig } from '@/lib/config'
import config from '../config'
const config = await getConfig()
import Layout from '../layouts/Layout.astro'
import '../styles/globals.css'
Expand All @@ -21,10 +22,10 @@ import '../styles/globals.css'
<!-- content container -->
<div class="m-auto max-w-md">
<!-- user container -->
<UserContainer client:load />
<UserContainer client:load config={config} />

<!-- button container -->
<ButtonContainer client:load />
<ButtonContainer client:load config={config} />
</div>

<!-- footer -->
Expand Down

0 comments on commit 7ff5041

Please sign in to comment.