Skip to content

Commit 870d30b

Browse files
committed
update code style
1 parent 60e5546 commit 870d30b

File tree

1 file changed

+5
-5
lines changed
  • src/pages/[platform]/start/quickstart/nextjs-pages-router

1 file changed

+5
-5
lines changed

src/pages/[platform]/start/quickstart/nextjs-pages-router/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ The starter application already has a pre-configured auth backend defined in the
224224
The fastest way to get your login experience up and running is to use our Authenticator UI component. In your **pages/_app.tsx** file, import the Authenticator UI component and wrap your `<App>` component.
225225

226226
```tsx title="pages/_app.tsx"
227+
import type { AppProps } from "next/app";
227228
// highlight-start
228229
import { Authenticator } from '@aws-amplify/ui-react'
229230
import '@aws-amplify/ui-react/styles.css'
230231
// highlight-end
231232
import "@/styles/app.css";
232-
import type { AppProps } from "next/app";
233233
import { Amplify } from "aws-amplify";
234234
import outputs from "@/amplify_outputs.json";
235235

@@ -305,7 +305,7 @@ import { generateClient } from "aws-amplify/data";
305305

306306
const client = generateClient<Schema>();
307307

308-
export default function App() {
308+
export default function HomePage() {
309309

310310
// highlight-start
311311
const { signOut } = useAuthenticator();
@@ -401,17 +401,17 @@ In the application client code, let's also render the username to distinguish di
401401
```tsx title="pages/index.tsx"
402402
// ... imports
403403

404-
function App() {
404+
function HomePage() {
405405
// highlight-next-line
406-
const user = useAuthenticator().user;
406+
const { user, signOut } = useAuthenticator();
407407

408408
// ...
409409

410410
return (
411411
<main>
412412
// highlight-next-line
413413
<h1>{user?.signInDetails?.loginId}'s todos</h1>
414-
{/* ... rest of the UI */}
414+
{/* ... */}
415415
</main>
416416
)
417417
}

0 commit comments

Comments
 (0)