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.
 
 

37 lines
712 B

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