Skip to content

Commit

Permalink
Merge branch 'release/0.3.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HASPIMA committed Jun 28, 2022
2 parents fb84fdc + 56d01eb commit fbcd772
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 24 deletions.
5 changes: 1 addition & 4 deletions src/components/layout/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box, Button, Container, Toolbar, Typography } from "@mui/material";
import { Container, Toolbar, Typography } from "@mui/material";
import DirectionsCarIcon from "@mui/icons-material/DirectionsCar";
import { useNavigate } from "react-router-dom";
import { styled } from "@mui/material/styles";

const Footers = styled("footer")(({ theme }) => ({
Expand All @@ -14,8 +13,6 @@ const Footers = styled("footer")(({ theme }) => ({
}));

const Footer = () => {
const navigate = useNavigate();

return (
<Footers>
<Container maxWidth="xl">
Expand Down
15 changes: 2 additions & 13 deletions src/components/profile/updateProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,17 @@ import {
Typography,
} from "@mui/material";
import API from "../../config/axios";
import { FormCheckbox } from "../form";
import FormHooks from "../../hooks/formHooks";
import { useLocation, useNavigate } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { profileSchema } from "../../schemas/profile";
import { until } from "../../helpers/until";
import { useState, useContext, useEffect } from "react";
import { UserContext } from "../../context/UserContext";
import { Navigate } from "react-router-dom";
import { useState } from "react";

const UpdateProfile = () => {
const { formProps, handleSubmit } = FormHooks(profileSchema, "onChange");
const { user } = useContext(UserContext);
const navigate = useNavigate();
const [submitting, setSubmitting] = useState(false);
const [status, setStatus] = useState({});
const [userId, setUserId] = useState();

useEffect(() => {
const userid = user.userId;
console.log(userid);
setUserId(userid);
}, [user]);

const onSubmit = async (data) => {
console.log("Data: ", data);
Expand Down
2 changes: 0 additions & 2 deletions src/components/rating/RatingParkingLot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import {
TextField,
LinearProgress,
Button,
Hidden,
} from "@mui/material";
import API from "../../config/axios";
import FormHooks from "../../hooks/formHooks";
import { ratingSchema } from "../../schemas/rating";
import { until } from "../../helpers/until";
import { useState } from "react";
import { useEffect, useContext } from "react";

const RatingParkingLot = () => {
const { formProps, handleSubmit } = FormHooks(ratingSchema, "onChange");
Expand Down
2 changes: 1 addition & 1 deletion src/components/reserve/ConfirmReserves.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Paper, Typography, Button } from "@mui/material";
import { useLocation, useNavigate } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { useContext } from "react";
import { UserContext } from "../../context/UserContext";

Expand Down
1 change: 0 additions & 1 deletion src/views/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Map from "../components/map/Map";
import Searchbar from "../components/map/Search";

const Home = ({ theme }) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/views/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@mui/material";
import { useContext, useEffect, useState } from "react";
import { UserContext } from "../context/UserContext";
import { useLocation, useNavigate } from "react-router-dom";
import { useNavigate } from "react-router-dom";

const Profile = () => {
const { user } = useContext(UserContext);
Expand Down
3 changes: 1 addition & 2 deletions src/views/TimeInParking.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import { UserContext } from "../context/UserContext";
import { useNavigate } from "react-router-dom";

const TimeInParking = () => {
const { user, realTime, toggleTimer, timer } = useContext(UserContext);
const [userInfo, setUserInfo] = useState({});
const { user, realTime, toggleTimer } = useContext(UserContext);
const [parking, setParking] = useState();
const navigate = useNavigate();

Expand Down

0 comments on commit fbcd772

Please sign in to comment.