Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About page #224

Merged
merged 13 commits into from
Nov 15, 2023
60 changes: 60 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/client/lib/authenticated-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const requiresLogin =
const { status } = useSession();

// Include any public pathnames here
const publicPaths = ["/signInPage"];
const publicPaths = ["/signInPage", "/about"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job here. Since the app has been updated to include middleware, in "Middleware.ts", please pull down and merge that code with this, and then add it to the matcher in the RegEx in the file so it's not a blocker for those who are not signed in.

const pathIsProtected = !publicPaths.includes(router.pathname);

useEffect(() => {
Expand Down
8 changes: 7 additions & 1 deletion src/components/navbar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
CoPresent,
Settings,
Logout,
Info,
} from "@mui/icons-material";
import { signOut } from "next-auth/react";
import { useSession } from "next-auth/react";
Expand All @@ -18,7 +19,7 @@ const NavBar = () => {
<>
{status === "authenticated" && (
<nav className={$navbar.sidebar}>
<Link href="/">
<Link href="/about">
<Image
src="/img/compass-logo-white.svg"
alt="logo"
Expand Down Expand Up @@ -46,6 +47,11 @@ const NavBar = () => {
<p className={$navbar.linkTitle}>Settings</p>
</Link>
<br />
<Link href="/about" className={$navbar.link}>
<Info className={$navbar.icon} />
Copy link
Contributor

@tessathornberry tessathornberry Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be sure you are adding the property types to the appropriate .css.d.ts file - and fix some of the "any" type errors.

<p className={$navbar.linkTitle}>About</p>
</Link>
<br />
<Link href="" className={$navbar.link}>
<Logout className={$navbar.icon} />
<p
Expand Down
19 changes: 19 additions & 0 deletions src/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Image from "next/image";
import $typo from "@/styles/Typography.module.css";

const About = () => {
return (
<>
<h2>About Compass</h2>

<div>
Compass is a civic app we are building for the San Francisco Unified
School District. The app seeks to assist Teachers with setting and
tracking goals for students with disabilities.
</div>
<div></div>
</>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we have the fragments instead of divs? (It makes it easier to apply CSS if they are specific elements rather than fragments.)
Minor cleanup request - please remove extra code we are not currently using, like the imports and empty div - we can add needed imports and components later.
Good job - this is a good starting point.

);
};

export default About;
16 changes: 9 additions & 7 deletions src/pages/signInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ const SignInPage = () => {

return (
<div className={$home.greetWrap}>
<Image
src="/img/compass-logo.svg"
alt="logo"
width={60}
height={60}
priority
/>
<button className={$button.about} onClick={() => router.push("/about")}>
<Image
src="/img/compass-logo.svg"
alt="logo"
width={60}
height={60}
priority
/>
</button>
<h1 className={$home.bold}>Welcome to Project Compass</h1>
<div>Log in with your Google account to continue</div>
<button
Expand Down
8 changes: 8 additions & 0 deletions src/styles/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
text-align: center;
font-size: 16px;
}
.about {
border:none;
background-color: transparent;
}
.about {
cursor: pointer;
}


.default:hover {
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3),
Expand Down
Loading