Unverified Commit 86ce29b3 authored by dominicfraser's avatar dominicfraser Committed by GitHub

Update authentication.md SSR example (#22641)

There are two examples, one (a) for "Authenticating Statically Generated Pages" and one (b) for "Authenticating Server-Rendered Pages".

(a) uses a sudo `useUser` hook to fetch the user client-side.

It looks like the example for (b) was copied and pasted then edited from (a), but in (b) this `useUser` hook is not used (instead using `req.session.get('user')`).

This PR simply removes the unused import in the (b) example.
parent eb79218b
......@@ -68,7 +68,6 @@ Let's transform the profile example to use [server-side rendering](/docs/basic-f
// pages/profile.js
import withSession from '../lib/session'
import useUser from '../lib/useUser'
import Layout from '../components/Layout'
export const getServerSideProps = withSession(async function ({ req, res }) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment