Skip to content

Commit

Permalink
feat: cleanup, copy update, and design update
Browse files Browse the repository at this point in the history
  • Loading branch information
m-sureshraj committed Sep 23, 2023
1 parent e138be8 commit fa1e1e6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 0 additions & 1 deletion spa-with-cognito-auth/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>spa-with-cognito-auth</title>
</head>
Expand Down
14 changes: 13 additions & 1 deletion spa-with-cognito-auth/frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
createStyles,
rem,
Skeleton,
Box,
Anchor,
} from '@mantine/core';
import { useNavigate, Link } from 'react-router-dom';
import { IconLogout, IconChevronDown, IconUser } from '@tabler/icons-react';
Expand All @@ -22,6 +24,12 @@ const useStyles = createStyles(() => ({
alignItems: 'center',
height: '100%',
},

logo: {
'&:hover': {
textDecoration: 'none',
},
},
}));

export function Header() {
Expand All @@ -35,7 +43,11 @@ export function Header() {
return (
<BaseHeader height={60}>
<Container className={classes.header}>
<Link to="/">Logo</Link>
<Box fz={34}>
<Anchor component={Link} to="/" className={classes.logo}>
😸
</Anchor>
</Box>

{!user ? (
<Skeleton animate={false} height={8} width={100} />
Expand Down
12 changes: 10 additions & 2 deletions spa-with-cognito-auth/frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Code } from '@mantine/core';
import { Code, Anchor } from '@mantine/core';
import { Link } from 'react-router-dom';

import { useUser } from '../userContext.tsx';

Expand All @@ -8,7 +9,14 @@ export function Home() {
return (
<>
<h2>Welcome to the App</h2>
<p>The following code block displays all of your details stored in AWS Cognito.</p>
<p>
The following code block displays all of your details stored in AWS Cognito. You
can edit the given name, family name and company name on the{' '}
<Anchor component={Link} to="/profile" color="violet">
profile page
</Anchor>
.
</p>

<Code block color="teal" p={20} fz={14}>
{JSON.stringify(user, null, 2)}
Expand Down

0 comments on commit fa1e1e6

Please sign in to comment.