diff --git a/src/App.js b/src/App.js index 5e205db..71c1f8f 100644 --- a/src/App.js +++ b/src/App.js @@ -47,7 +47,7 @@ function App() { } /> } /> } /> - } /> + } /> { + const navigate = useNavigate(); const { currentUserCreatedAt } = useContext(AuthContext); const { appState } = useContext(AppContext); const { group } = appState; @@ -34,6 +36,11 @@ const AccountPage = () => { return null; } + const handleSupport = () => { + const supReq = "5ac45d12"; + navigate(`/requestpage/${supReq}`); + }; + return (
@@ -124,17 +131,17 @@ const AccountPage = () => {
Need Support?
+ {/* -
+ */} + - {/* -
- Or use our contact form -
- */} +
+ Or use our contact form +
diff --git a/src/Components/Home/DemoRequestPage.js b/src/Components/Home/DemoRequestPage.js index 73a285d..3991942 100644 --- a/src/Components/Home/DemoRequestPage.js +++ b/src/Components/Home/DemoRequestPage.js @@ -5,6 +5,7 @@ import Col from "react-bootstrap/Col"; import Form from "react-bootstrap/Form"; import Row from "react-bootstrap/Row"; import { demofields } from "../../Constants/Fields/DemoFields"; +import { useParams } from "react-router-dom"; import { splitEvery } from "../../Utils/Array"; import TextInput from "../../pageElements/TextInput"; import { objectMap } from "../../Utils/Object"; @@ -20,10 +21,13 @@ import { collection, setDoc, doc } from "firebase/firestore"; import "../../styles/demo-request-page.scss"; const DemoRequestPage = () => { + const { supReq } = useParams(); const navigate = useNavigate(); const [data, setData] = useState(getFormDataDefaults(demofields)); const [isBusy, setIsBusy] = useState(); const fieldsChunkSize = 2; + const isSupport = supReq === "5ac45d12"; + console.log("isSupport", isSupport); const handleChangeInput = (e, name) => { const newData = handleFormDataChange(e, name, data, demofields); diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index e17fc2c..dc03c15 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -21,7 +21,8 @@ const HomePage = () => { }; const handleDemo = () => { - navigate("/demorequestpage"); + const supReq = null; + navigate("/requestpage/supReq"); }; return (