Skip to content

Commit afe90a9

Browse files
authored
Merge pull request #193 from aclar48/vercel-integration
Update to Support Vercel deployment of Sample App
2 parents 46a90fe + 39aa96d commit afe90a9

10 files changed

Lines changed: 3511 additions & 4560 deletions

File tree

Sample-01/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ yarn-error.log*
3838

3939
# vercel
4040
.vercel
41+
.env*.local

Sample-01/components/Content.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { Row, Col } from 'reactstrap';
33
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4+
import { faLink } from '@fortawesome/free-solid-svg-icons';
45

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

@@ -14,7 +15,7 @@ const Content = () => (
1415
<Col key={i} md={5} className="mb-4">
1516
<h6 className="mb-3">
1617
<a href={col.link}>
17-
<FontAwesomeIcon icon="link" className="mr-2" />
18+
<FontAwesomeIcon icon="fa-solid fa-link" className="mr-2" />
1819
{col.title}
1920
</a>
2021
</h6>

Sample-01/components/NavBarItem.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import React from 'react';
22
import { usePathname } from 'next/navigation';
33
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4+
import { library } from '@fortawesome/fontawesome-svg-core';
5+
import { fas } from '@fortawesome/free-solid-svg-icons';
6+
7+
library.add(fas);
48

59
const NavBarItem = ({ children, href, className, icon, tabIndex, testId }) => {
610
const pathname = usePathname();
711
const activeClass = 'navbar-item-active';
812
const activeClasses = className ? `${className} ${activeClass}` : activeClass;
9-
1013
return (
1114
<span className="d-inline-flex align-items-center navbar-item">
12-
{icon && <FontAwesomeIcon icon={icon} className="mr-3" />}
15+
{icon && icon.length > 0 && <FontAwesomeIcon icon={`fa-solid fa-${icon}`} className="mr-3" />}
1316
<span className={pathname === href ? activeClasses : className} tabIndex={tabIndex} data-testid={testId}>
1417
{children}
1518
</span>

Sample-01/components/PageLink.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ import NavBarItem from './NavBarItem';
55

66
const PageLink = ({ children, href, className, icon, tabIndex, testId }) => {
77
return (
8-
<Link legacyBehavior href={href}>
9-
<a>
10-
<NavBarItem href={href} className={className} icon={icon} tabIndex={tabIndex} testId={testId}>
11-
{children}
12-
</NavBarItem>
13-
</a>
8+
<Link href={href}>
9+
<NavBarItem href={href} className={className} icon={icon} tabIndex={tabIndex} testId={testId}>
10+
{children}
11+
</NavBarItem>
1412
</Link>
1513
);
1614
};

Sample-01/lib/auth0.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const auth0 = new Auth0Client({
77
// domain: process.env.AUTH0_DOMAIN,
88
// clientId: process.env.AUTH0_CLIENT_ID,
99
// clientSecret: process.env.AUTH0_CLIENT_SECRET,
10-
// appBaseUrl: process.env.APP_BASE_URL,
1110
// secret: process.env.AUTH0_SECRET,
11+
appBaseUrl: process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : process.env.APP_BASE_URL,
1212
authorizationParameters: {
1313
// In v4, the AUTH0_SCOPE and AUTH0_AUDIENCE environment variables are no longer automatically picked up by the SDK.
1414
// Instead, we need to provide the values explicitly.

0 commit comments

Comments
 (0)