diff --git a/src/components/ApplicationViews.js b/src/components/ApplicationViews.js index e69de29..32486ed 100644 --- a/src/components/ApplicationViews.js +++ b/src/components/ApplicationViews.js @@ -0,0 +1,18 @@ +import React from "react" +import { Route } from "react-router-dom" +import { GraphicsBayTrackerHome } from "./home/GraphicsBayTrackerHome" +import { Profile } from "./profile/Profile" + + +export const ApplicationViews = () => { + return ( + <> + + + + + + + + ) +} diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index b8f6fd5..4eb4724 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js @@ -9,7 +9,7 @@ export const Login = () => { const history = useHistory() const existingUserCheck = () => { - return fetch(`http://localhost:8088/customers?email=${email}`) + return fetch(`http://localhost:8088/users?email=${email}`) .then(res => res.json()) .then(user => user.length ? user[0] : false) } @@ -20,7 +20,7 @@ export const Login = () => { .then(exists => { if (exists) { localStorage.setItem("graphicsbaytracker_customer", exists.id) - history.push("/") + history.push("") } else { existDialog.current.showModal() } @@ -56,6 +56,9 @@ export const Login = () => {
Not a member yet?
+
+ Skip Login +
) } diff --git a/src/components/auth/Logout.js b/src/components/auth/Logout.js new file mode 100644 index 0000000..1a3f6dd --- /dev/null +++ b/src/components/auth/Logout.js @@ -0,0 +1,16 @@ +import React from "react" +import {useState, useEffect} from "react" +import { useHistory } from "react-router-dom" + +export const Logout = () => { + const [loggedincustomer, setloggedincustomer] = useState(localStorage.graphicsbaytracker_customer) + return ( + <> +
+ +
+ + ) + + +} \ No newline at end of file diff --git a/src/components/auth/Register.js b/src/components/auth/Register.js index 1e66c6d..ee1df65 100644 --- a/src/components/auth/Register.js +++ b/src/components/auth/Register.js @@ -9,7 +9,7 @@ export const Register = (props) => { const history = useHistory() const existingUserCheck = () => { - return fetch(`http://localhost:8088/customers?email=${customer.email}`) + return fetch(`http://localhost:8088/users?email=${customer.email}`) .then(res => res.json()) .then(user => !!user.length) } @@ -18,7 +18,7 @@ export const Register = (props) => { existingUserCheck() .then((userExists) => { if (!userExists) { - fetch("http://localhost:8088/customers", { + fetch("http://localhost:8088/users", { method: "POST", headers: { "Content-Type": "application/json" diff --git a/src/components/home/GraphicsBayTrackerHome.js b/src/components/home/GraphicsBayTrackerHome.js index e69de29..e2a5b05 100644 --- a/src/components/home/GraphicsBayTrackerHome.js +++ b/src/components/home/GraphicsBayTrackerHome.js @@ -0,0 +1,10 @@ +import React from "react" +import { NavBar } from "../nav/NavBar" + +export const GraphicsBayTrackerHome =()=>{ + const displayNavBar = NavBar() + + return
+ {displayNavBar} +
+} \ No newline at end of file diff --git a/src/components/home/NewsStories.js b/src/components/home/NewsStories.js index e69de29..e0f4efe 100644 --- a/src/components/home/NewsStories.js +++ b/src/components/home/NewsStories.js @@ -0,0 +1,4 @@ + +export const NewsStories = () => { + return
+} \ No newline at end of file diff --git a/src/components/nav/NavBar.js b/src/components/nav/NavBar.js index e69de29..e600cd3 100644 --- a/src/components/nav/NavBar.js +++ b/src/components/nav/NavBar.js @@ -0,0 +1,48 @@ +import React, { useEffect, useState } from "react" +import { Link, useHistory } from "react-router-dom" +import { Login } from "../auth/Login" +import { Logout } from "../auth/Logout" +import "./NavBar.css" + + + +export const NavBar = () => { + const history = useHistory() + + + + return ( +
+ +
+ ) +} diff --git a/src/components/pricing/DropDownFilters.js b/src/components/pricing/DropDownFilters.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/pricing/GPUDataInterface.js b/src/components/pricing/GPUDataInterface.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/pricing/OEMSelector.js b/src/components/pricing/OEMSelector.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/pricing/PricingData.js b/src/components/pricing/PricingData.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/profile/Profile.js b/src/components/profile/Profile.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/profile/ProfileData.js b/src/components/profile/ProfileData.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/profile/TrackedCards.js b/src/components/profile/TrackedCards.js new file mode 100644 index 0000000..e69de29