From 52259ce7a1bc5f66f6c405c7968bd10c27acf817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20M=C3=A1rquez=20Vara?= <47271218+xvxnoah@users.noreply.github.com> Date: Thu, 9 Nov 2023 00:23:33 +0100 Subject: [PATCH] Uncomment signup and update staticwebapp --- src/components/Signup.jsx | 13 +++---------- staticwebapp.config.json | 6 ++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/Signup.jsx b/src/components/Signup.jsx index 250caf5..c1d8338 100644 --- a/src/components/Signup.jsx +++ b/src/components/Signup.jsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { Link, useHistory, useNavigate } from "react-router-dom"; -/* + //Logic packages import { useState } from "react"; import { useNavigate } from "react-router-dom"; @@ -24,11 +24,10 @@ import "../css/common.css"; //Assets import logo from "../assets/logo.png"; -import terms from "../assets/jsonData/terms.json";*/ +import terms from "../assets/jsonData/terms.json"; function Signup() { /* Variables */ -/* const [username, setUsername] = useState(""); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); @@ -69,7 +68,6 @@ function Signup() { /* Functions */ /* Validations */ -/* const isUsernameValid = (username = "") => { if (username.length === 0) { setUsernameValidationMessage("This field is required"); @@ -144,7 +142,6 @@ function Signup() { }; /* Requests */ -/* const isUsernameAvailable = async (username = "") => { if (!isDoingRequest) { setIsDoingRequest(true); @@ -260,7 +257,6 @@ function Signup() { }; /* Events */ -/* const onUsernameChange = ({ target: { value } }) => { setUsername(value); isUsernameValid(value); @@ -332,9 +328,6 @@ function Signup() { return (
- This is the Signup page -
- /*
@@ -577,7 +570,7 @@ function Signup() { -
*/ + ); } diff --git a/staticwebapp.config.json b/staticwebapp.config.json index 83a40ea..be0053c 100644 --- a/staticwebapp.config.json +++ b/staticwebapp.config.json @@ -41,5 +41,11 @@ "navigationFallback": { "rewrite": "/index.html", "exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/js/*"] + }, + "responseOverrides": { + "404": { + "rewrite": "/index.html", + "statusCode": 200 + } } }