Skip to content

Commit

Permalink
pages/index.js updated
Browse files Browse the repository at this point in the history
  • Loading branch information
markandey1414 committed Oct 5, 2023
1 parent 1aef497 commit 20596ef
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
import Head from 'next/head'
import ReactMarkdown from 'react-markdown'
import { getComponentHtml } from '../lib/api'
import { useRouter } from 'next/router'

export default function Home({ headerHtml }) {
const router = useRouter()

//this makes us access the component
const { name } = router.query

//this will fetch the data
const componentData = getComponentByName(name)

return (
<>
<Head>
<title>DriftShifty</title>
</Head>
<ReactMarkdown children={headerHtml} />
<main>
<h1>Welcome to DriftShifty</h1>
<p>This is a website that helps you shift your drifts.</p>
<h1>Welcome to Drifty</h1>
</main>
</>
)
Expand Down

0 comments on commit 20596ef

Please sign in to comment.