Template for starting apps, powered by Next.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
673 B

  1. import {GetServerSideProps, NextPage} from 'next'
  2. import {USER} from '../utilities/popups'
  3. import {QUERY, POPUP} from '../utilities/queryKeys'
  4. import Template from '../components/templates/Index'
  5. type Props = {
  6. query: string
  7. }
  8. const Page: NextPage<Props> = ({query}) => {
  9. return (
  10. <Template
  11. query={query}
  12. userLinkLabel="User"
  13. searchQueryKey={QUERY}
  14. searchLabel="Search"
  15. searchHint="e.g. keywords, names&hellip;"
  16. popupQueryKey={POPUP}
  17. userPopupQueryValue={USER}
  18. />
  19. )
  20. }
  21. export default Page
  22. export const getServerSideProps: GetServerSideProps = async (ctx) => {
  23. const {[QUERY]: query = ''} = ctx.query
  24. return {
  25. props: {
  26. query,
  27. },
  28. }
  29. }