From ebb1dc842cc591cec2f9427d46eddf6bec7a5790 Mon Sep 17 00:00:00 2001 From: Mikayla Dobson <93477693+innocuous-symmetry@users.noreply.github.com> Date: Sat, 8 Oct 2022 16:03:46 -0500 Subject: [PATCH] building out more text content, site structure --- client/src/App.tsx | 6 +++++ client/src/components/Auth/AuthForm.tsx | 8 ++++-- client/src/components/Auth/authExtraText.tsx | 15 +++++++++++ client/src/components/Content/Contact.tsx | 26 +++++++++++++++++++ client/src/components/Content/Philosophy.tsx | 12 +++++++++ client/src/components/Product/AllProducts.tsx | 24 +++++++++++++++-- 6 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 client/src/components/Auth/authExtraText.tsx create mode 100644 client/src/components/Content/Contact.tsx create mode 100644 client/src/components/Content/Philosophy.tsx diff --git a/client/src/App.tsx b/client/src/App.tsx index d7e9a18..cf5ee2e 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -13,6 +13,8 @@ import UserProfile from './components/User/UserProfile' import UserSettings from './components/User/UserSettings' import OrderHistory from './components/Order/OrderHistory' import OrderRecord from './components/Order/OrderRecord' +import Philosophy from './components/Content/Philosophy' +import Contact from './components/Content/Contact' // util import { SupabaseProvider, useSupabase } from './supabase/SupabaseContext' @@ -51,6 +53,10 @@ export default function App() { {/* Order data */} } /> } /> + + {/* Misc content pages */} + } /> + } /> diff --git a/client/src/components/Auth/AuthForm.tsx b/client/src/components/Auth/AuthForm.tsx index 8835c62..303ae1c 100644 --- a/client/src/components/Auth/AuthForm.tsx +++ b/client/src/components/Auth/AuthForm.tsx @@ -1,6 +1,8 @@ -import { useSupabase } from "../../supabase/SupabaseContext"; import { FormInput, getSession, handleLogin, handleRegister } from "../../util/authHelpers"; +import { useSupabase } from "../../supabase/SupabaseContext"; import { AuthFormType } from "../../util/types"; +import { loginHTML, registerHTML } from "./authExtraText"; + import { useState } from "react"; import Button from "../_ui/Button/Button"; import Page from "../_ui/Page/Page"; @@ -10,12 +12,14 @@ const AuthForm: AuthFormType = ({ format }) => { const supabase = useSupabase(); const formText = format == "login" ? "Login" : "Register"; const formFunction = format == "login" ? () => handleLogin(supabase, input) : () => handleRegister(supabase, input); + const formHTML = format == "login" ? loginHTML : registerHTML; return (

{formText}

+ {formHTML} -
+
setInput({...input, email: e.target.value})} /> diff --git a/client/src/components/Auth/authExtraText.tsx b/client/src/components/Auth/authExtraText.tsx new file mode 100644 index 0000000..beee7b0 --- /dev/null +++ b/client/src/components/Auth/authExtraText.tsx @@ -0,0 +1,15 @@ +export const loginHTML = ( + <> +

Welcome back!

+

It's great to see you again.

+

Please enter your credentials below to login:

+ +) + +export const registerHTML = ( + <> +

Hi there!

+

Thank you so much for your interest in the site!

+

Please use the form below to register.

+ +) \ No newline at end of file diff --git a/client/src/components/Content/Contact.tsx b/client/src/components/Content/Contact.tsx new file mode 100644 index 0000000..cd386ee --- /dev/null +++ b/client/src/components/Content/Contact.tsx @@ -0,0 +1,26 @@ +import Gallery from "../_ui/Gallery/Gallery"; +import Page from "../_ui/Page/Page"; + +export default function Contact() { + return ( + +

Something you wanted to talk to us about?

+ +

We'd love to hear it!

+

You can reach me at any of these social media outlets:

+ + +

Wew

+

Wew

+

Wew

+
+ +

You can also use the following form to reach out:

+ + + + + +
+ ) +} \ No newline at end of file diff --git a/client/src/components/Content/Philosophy.tsx b/client/src/components/Content/Philosophy.tsx new file mode 100644 index 0000000..bef4023 --- /dev/null +++ b/client/src/components/Content/Philosophy.tsx @@ -0,0 +1,12 @@ +import Page from "../_ui/Page/Page"; + +export default function Philosophy() { + return ( + +

The Express Spices Philosophy

+ +

Things and stuff and things and stuff and things and stuff and things and stuff and things and stuff and things.

+

Furthermore, things and stuff and things and stuff and things and stuff and things and stuff and things and stuff and things.

+
+ ) +} \ No newline at end of file diff --git a/client/src/components/Product/AllProducts.tsx b/client/src/components/Product/AllProducts.tsx index 42b3c4f..7f3882e 100644 --- a/client/src/components/Product/AllProducts.tsx +++ b/client/src/components/Product/AllProducts.tsx @@ -2,13 +2,14 @@ import { useEffect, useState } from "react" import { v4 } from "uuid"; import { getAllProducts } from "../../util/apiUtils"; import { ProductModel } from "../../util/types"; +import Card from "../_ui/Card/Card"; import Gallery from "../_ui/Gallery/Gallery"; import Page from "../_ui/Page/Page"; import ProductCard from "./ProductCard"; export default function AllProducts() { const [productData, setProductData] = useState(); - const [view, setView] = useState(

Loading...

); + const [view, setView] = useState(

Loading...

); useEffect(() => { getAllProducts() @@ -23,7 +24,26 @@ export default function AllProducts() { useEffect(() => { setView( -

All Products!

+

Product Catalog

+ + +
+

Filter results by:

+ +
+
+

Select by category:

+
+
+

Select by region:

+
+
+ { productData && productData.map((data: ProductModel) => {