Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sample-01/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import Footer from '../components/Footer';
import React from 'react';
import { UserProvider } from '@auth0/nextjs-auth0/client';

import '@fortawesome/fontawesome-svg-core/styles.css';

// Force one-time early load of fontawesome and prevent lazy load
// Icons will no longer display large and then re-render to proper size
import { config } from '@fortawesome/fontawesome-svg-core';

config.autoAddCss = false; /* eslint-disable import/first */

export default function RootLayout({ children }) {
return (
<html lang="en">
Expand All @@ -20,6 +28,8 @@ export default function RootLayout({ children }) {
<link rel="stylesheet" href="https://cdn.auth0.com/js/auth0-samples-theme/1.0/css/auth0-theme.min.css" />
</head>
<body>
// Override the RootLayout component to make the authentication
// state available to all pages. Access by using useUser() hook.
<UserProvider>
<main id="app" className="d-flex flex-column h-100" data-testid="layout">
<NavBar />
Expand Down
6 changes: 6 additions & 0 deletions Sample-01/components/Content.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import React from 'react';
import { Row, Col } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'

import contentData from '../utils/contentData';

// Without this, a not-found log to console occurs
library.add(fas);

const Content = () => (

<div className="next-steps my-5" data-testid="content">
<h2 className="my-5 text-center" data-testid="content-title">
What can I do next?
Expand Down