- );
-}
From 78c37163f04eb4a0e86deb7b31abd81bd72fb038 Mon Sep 17 00:00:00 2001
From: bbland1 <104288486+bbland1@users.noreply.github.com>
Date: Tue, 24 Sep 2024 23:55:40 -0400
Subject: [PATCH 03/17] mod: a text version/skeleton of the about page of the
application
---
src/views/unauthenticated/About.tsx | 43 +++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 3 deletions(-)
diff --git a/src/views/unauthenticated/About.tsx b/src/views/unauthenticated/About.tsx
index f401dac..478fa37 100644
--- a/src/views/unauthenticated/About.tsx
+++ b/src/views/unauthenticated/About.tsx
@@ -3,17 +3,54 @@ import React from "react";
export function About() {
return (
+
ABOUT APPLICATION NAME
-
How it all works
+
How works
+
+
+ Create a list for different stores or different grouping of items.
+
+
Select a list that you'd like to add items on.
+
+ Open the list manager, to start adding items and choosing when you
+ will need to restock next.
+
+
+ Now that your new list has items you can start checking off items as
+ you shop!
+
+
+ Each time an item is marked purchase the application evaluates
+ your shopping habits! Supporting you by adjusting your next
+ purchase predictions base on when your previous shopping
+ history!
+
+
+
+
+ If someone else needs to be let into to the shopping time you can
+ easily share specific lists with with in the list manager so they
+ can see and mark items as purchased too!
+
+
Creators
-
+
Maha Ahmed
+
+
+
Brianna Bland
+
+
+
Falak Zahra
+
+
+
Ross Clettenberg
-
Thank you to
+
Thank you
Mentors: Alex, Aditya, Tanner
The entire The Collab Lab.
From df82471cc3e3b5d823791955fca8c7ae0963c9b2 Mon Sep 17 00:00:00 2001
From: bbland1 <104288486+bbland1@users.noreply.github.com>
Date: Wed, 25 Sep 2024 01:00:16 -0400
Subject: [PATCH 04/17] feat: added an unauthenticated home context with way to
navigate to about page with button
---
src/views/Home.tsx | 45 ++++++++++---------
src/views/Layout.tsx | 14 ++++--
src/views/index.ts | 1 +
src/views/unauthenticated/NewUserHomeInfo.tsx | 33 ++++++++++++++
4 files changed, 69 insertions(+), 24 deletions(-)
create mode 100644 src/views/unauthenticated/NewUserHomeInfo.tsx
diff --git a/src/views/Home.tsx b/src/views/Home.tsx
index 4c46603..64de0fa 100644
--- a/src/views/Home.tsx
+++ b/src/views/Home.tsx
@@ -1,7 +1,8 @@
import React from "react";
import "./Home.css";
import { SingleList, CreateList } from "../components";
-import { List, User } from "../api/firebase";
+import { List, User } from "../api";
+import { NewUserHomeInfo } from "../views";
interface Props {
data: List[];
@@ -10,26 +11,28 @@ interface Props {
}
export function Home({ data, setListPath, user }: Props) {
+ if (!user) {
+ return ;
+ }
+
return (
- <>
-
-
- Hello from the home (/) page!
-
- {user && (
-
- {data.map((list, index) => (
-
- ))}
-
-
- )}
-
- >
+
+
+ Hello from the home (/) page!
+
+ {user && (
+
+ {data.map((list, index) => (
+
+ ))}
+
+
+ )}
+
);
}
diff --git a/src/views/Layout.tsx b/src/views/Layout.tsx
index 0a65806..fbb37fa 100644
--- a/src/views/Layout.tsx
+++ b/src/views/Layout.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import { Outlet } from "react-router-dom";
-import { SignInButton, User } from "../api";
+import { Outlet, useNavigate } from "react-router-dom";
+import { User } from "../api";
import { AuthenticatedNavBar } from "../components";
import "./Layout.css";
@@ -10,6 +10,7 @@ interface Props {
}
export function Layout({ user }: Props) {
+ const navigate = useNavigate();
return (
<>
@@ -17,8 +18,15 @@ export function Layout({ user }: Props) {
Smart shopping list
+ {user && (
+
+ )}
- {!user && }
{user && }
diff --git a/src/views/index.ts b/src/views/index.ts
index 742b5a2..c25508b 100644
--- a/src/views/index.ts
+++ b/src/views/index.ts
@@ -4,3 +4,4 @@ export * from "./Layout";
export * from "./authenticated/List";
export * from "./unauthenticated/PageNotFound";
export * from "./unauthenticated/About";
+export * from "./unauthenticated/NewUserHomeInfo";
diff --git a/src/views/unauthenticated/NewUserHomeInfo.tsx b/src/views/unauthenticated/NewUserHomeInfo.tsx
new file mode 100644
index 0000000..02640ed
--- /dev/null
+++ b/src/views/unauthenticated/NewUserHomeInfo.tsx
@@ -0,0 +1,33 @@
+import React from "react";
+import { useNavigate } from "react-router-dom";
+import { SignInButton } from "../../api";
+
+export function NewUserHomeInfo() {
+ const navigate = useNavigate();
+
+ return (
+ <>
+
Welcome to APPLICATION NAME
+
+ The next best thing to having someone else do the shopping for you!
+ Create and manage smart lists learn your habits to let you know exactly
+ when you will need t
+
+
+
+
New to APPLICATION NAME?
+
+
+
+
+
Welcome Back:
+
+
+ >
+ );
+}
From a6baa085d6b1314d73a6faac8bc33d3b121757e4 Mon Sep 17 00:00:00 2001
From: bbland1 <104288486+bbland1@users.noreply.github.com>
Date: Wed, 25 Sep 2024 01:31:32 -0400
Subject: [PATCH 05/17] feat: added unauthenticated nav bar for another option
on getting to about page
---
src/components/AuthenticatedNavBar.tsx | 2 +-
.../{AuthenticatedNavBar.css => NavBar.css} | 0
src/components/index.ts | 1 +
.../unauthenticated/UnauthenticatedNavBar.tsx | 19 +++++++++++++++++++
src/views/Layout.tsx | 4 ++--
5 files changed, 23 insertions(+), 3 deletions(-)
rename src/components/{AuthenticatedNavBar.css => NavBar.css} (100%)
create mode 100644 src/components/unauthenticated/UnauthenticatedNavBar.tsx
diff --git a/src/components/AuthenticatedNavBar.tsx b/src/components/AuthenticatedNavBar.tsx
index 6441ee5..4ddb657 100644
--- a/src/components/AuthenticatedNavBar.tsx
+++ b/src/components/AuthenticatedNavBar.tsx
@@ -2,7 +2,7 @@ import React from "react";
import { NavLink } from "react-router-dom";
import { SignOutButton } from "../api";
-import "./AuthenticatedNavBar.css";
+import "./NavBar.css";
export function AuthenticatedNavBar() {
return (
diff --git a/src/components/AuthenticatedNavBar.css b/src/components/NavBar.css
similarity index 100%
rename from src/components/AuthenticatedNavBar.css
rename to src/components/NavBar.css
diff --git a/src/components/index.ts b/src/components/index.ts
index 50121f3..5c38caf 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -4,3 +4,4 @@ export * from "./CreateList";
export * from "./ProtectedRoute";
export * from "./AuthenticatedNavBar";
export * from "./forms/ShareListForm";
+export * from "./unauthenticated/UnauthenticatedNavBar";
diff --git a/src/components/unauthenticated/UnauthenticatedNavBar.tsx b/src/components/unauthenticated/UnauthenticatedNavBar.tsx
new file mode 100644
index 0000000..a7dcdad
--- /dev/null
+++ b/src/components/unauthenticated/UnauthenticatedNavBar.tsx
@@ -0,0 +1,19 @@
+import React from "react";
+import { NavLink } from "react-router-dom";
+
+import "../NavBar.css";
+
+export function UnauthenticatedNavBar() {
+ return (
+
+ );
+}
diff --git a/src/views/Layout.tsx b/src/views/Layout.tsx
index fbb37fa..63bc91d 100644
--- a/src/views/Layout.tsx
+++ b/src/views/Layout.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { Outlet, useNavigate } from "react-router-dom";
import { User } from "../api";
-import { AuthenticatedNavBar } from "../components";
+import { AuthenticatedNavBar, UnauthenticatedNavBar } from "../components";
import "./Layout.css";
@@ -28,7 +28,7 @@ export function Layout({ user }: Props) {
)}
- {user && }
+ {user ? : }
The next best thing to having someone else do the shopping for you!
Create and manage smart lists learn your habits to let you know exactly
@@ -15,7 +15,7 @@ export function NewUserHomeInfo() {