The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Get Query String Param From URL

TODO: Pull subtitle into page object

NOTE: The below is probably not the way you want to go.

See the useRouter stuff that you need to add that is hopefully above...

The reason probalby not to use this is that `

TODO: Clean this up and remove the tailwind stuff and just get to the example

code_start_default_section code_end_default_section

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Get Query String Param From URL

-- p

NOTE: The below is probably not the way you want to go.

-- p

See the useRouter stuff that you need to add that is hopefully above...

-- p

The reason probalby not to use this is that `<Link>` stuff doesn't work well with it.

-- p

TODO: Clean this up and remove the tailwind stuff and just get to the example

-- code/

import Head from 'next/head'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'

export default function Home() {
  const [pageNum, setPageNum] = useState(1)
  const router = useRouter()

  useEffect(() => {
    if (!router.isReady) return
    const page = router.query['page']
    setPageNum(router.query['page'])
  }, [router.isReady])

  return (
    <div>
      <Head>
        <title>A Jack Torrance Experience</title>
        <meta name="description" content="The writing of Jack Torrance" />
      </Head>

      <div className="flex flex-col h-screen">
        <div className="flex-grow" id="container">
          <p>all work and no play makes jack a dull boy</p>
          <p>Page: {pageNum}</p>
        </div>
        <div className="text-xs text-right">This is the footer</div>
      </div>
    </div>
  )
}

-- /code


-- categories
-- Miscellaneous

-- metadata
-- date: 2021-12-30 14:29:51
-- id: 231dewrm
-- status: scratch
-- type: post
-- SCRUBBED_NEO: false
-- site: aws