Skip to content

Commit

Permalink
Removed search bar from login and sign up page (#827)
Browse files Browse the repository at this point in the history
* changed the color of create text to white

* .

* removed search bar from login and signup pages

* fix
  • Loading branch information
wilsonfurtado2000 authored Jul 11, 2023
1 parent 214cd35 commit e35264f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/NavBar/new/MiniNavbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "@mui/material";
import { makeStyles } from "@mui/styles";
import React, { useCallback, useEffect, useRef, useState } from "react";
import { useLocation } from 'react-router-dom';
import Headroom from "react-headroom";
import BrandName from "../../../../helpers/brandName";
import SearchIcon from "@mui/icons-material/Search";
Expand Down Expand Up @@ -74,6 +75,11 @@ function MiniNavbar() {

const windowSize = useWindowSize();

const location = useLocation();
const routeName = location.pathname;

const excludedRoutes = ['/login', '/signup']

const toggleDrawer = useCallback(state => {
setOpenDrawer(state);
}, []);
Expand Down Expand Up @@ -135,7 +141,8 @@ function MiniNavbar() {
</IconButton>
</Grid>
</Grid>
<Grid style={{ display: "inline-block" }} item xs={12} md={4}>
{!excludedRoutes.includes(routeName) &&
<Grid style={{ display: "inline-block" }} item xs={12} md={4}>
<Paper component={"form"} className={classes.root} elevation={0}>
<IconButton
type="submit"
Expand All @@ -159,7 +166,7 @@ function MiniNavbar() {
placeholder="Search..."
/>
</Paper>
</Grid>
</Grid>}
<Grid item className={classes.gridButton}>
<Button
variant="contained"
Expand Down

0 comments on commit e35264f

Please sign in to comment.