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
2 changes: 0 additions & 2 deletions src/components/navbar/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
.linkItem {
padding: 1.25rem 0 1.25rem calc(45% - 1.5rem * 1.5);
}

.link {
color: var(--on-primary);
text-decoration: none;
Expand All @@ -34,7 +33,6 @@
.burger {
color: var(--primary-99);
}

@media (min-width: 992px) {
.linkItem {
padding-left: 9%;
Expand Down
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export function middleware(request: NextRequest) {
return NextResponse.next();
}

export const config = { matcher: ["/((?!img|_next|api|signInPage).*)"] };
export const config = { matcher: ["/((?!img|_next|api|signInPage|about).*)"] };
15 changes: 15 additions & 0 deletions src/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const About = () => {
return (
<div>
<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>
);
};

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
7 changes: 7 additions & 0 deletions src/styles/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
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