Skip to content

Commit

Permalink
Added new React Guide for Authenticated Routes (#1675)
Browse files Browse the repository at this point in the history
* Began work on new guides for auth

* Added React guide

* Updated guide

* capitilization update

* Addex Example Wrapper

Co-authored-by: Erik Hanchett <ehhanche@amazon.com>
  • Loading branch information
ErikCH and Erik Hanchett authored Apr 13, 2022
1 parent 1b78ac7 commit 572b728
Show file tree
Hide file tree
Showing 11 changed files with 527 additions and 0 deletions.
Binary file added docs/public/example-auth-routes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/src/components/Layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ const Nav = (props) => (
<NavLink {...props} href="/theming">
Theming
</NavLink>
<NavLink {...props} href="/guides">
Guides
</NavLink>
<Divider orientation="vertical" />
<NavLink {...props} isExternal href="https://docs.amplify.aws">
Amplify docs <MdOpenInNew />
Expand Down
13 changes: 13 additions & 0 deletions docs/src/components/Layout/SecondaryNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ export const SecondaryNav = (props) => {
);
}

if (section === 'guides') {
return (
<>
<NavLink {...props} href="/guides">
Guides
</NavLink>
<NavLink {...props} href="/guides/auth-protected">
Protected Routes
</NavLink>
</>
);
}

if (section === 'getting-started') {
return (
<>
Expand Down
9 changes: 9 additions & 0 deletions docs/src/data/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ export const META_INFO: MetaInfo = {
description:
'A Theme is a structured collection of design decisions that change the appearance of a UI library. An Amplify UI theme is a structured object of design tokens, breakpoints, and overrides. - Amplify UI',
},
'/guides': {
title: 'Guides',
description:
'Amplify guides are meant to give you a more in-depth understanding of how to use the Amplify CLI, libraries, and hosting to build out common functionality, end-to-end solutions, and frequently asked for workflows.',
},
'/guides/auth-protected': {
title: 'Guides',
description: 'How to protect routes with Amplify Authenticator.',
},
'/theming/default-theme': {
title: 'Theming - Default Theme',
description:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Coming Soon
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Coming Soon
Loading

0 comments on commit 572b728

Please sign in to comment.