From 4e55f23fd22691a33a2741b60db606ffce6ef0c1 Mon Sep 17 00:00:00 2001 From: Victor Frunze Date: Mon, 9 Dec 2024 09:56:43 +0200 Subject: [PATCH] MWB-888: fix search for dark theme --- .../app/project-switch2/project-switch.js | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/mapping_workbench/frontend/src/layouts/app/project-switch2/project-switch.js b/mapping_workbench/frontend/src/layouts/app/project-switch2/project-switch.js index 22c60d34..25687d46 100644 --- a/mapping_workbench/frontend/src/layouts/app/project-switch2/project-switch.js +++ b/mapping_workbench/frontend/src/layouts/app/project-switch2/project-switch.js @@ -14,7 +14,7 @@ import OutlinedInput from '@mui/material/OutlinedInput'; import InputAdornment from '@mui/material/InputAdornment'; import {ProjectsContext} from "../../../contexts/projects"; -import {useRouter} from "../../../hooks/use-router"; +import {useRouter} from "next/router"; import {paths} from 'src/paths'; export const ProjectSwitch = ({small}) => { @@ -40,13 +40,18 @@ export const ProjectSwitch = ({small}) => { setAnchorEl(null); }; - return ( + console.log(theme) + {/*{backgroundColor: '#f0edf9',*/} + + return ( + + color={'#1D2939'} + sx={{backgroundColor:theme.palette.primary.light, borderRadius: '8px', p: '9px', cursor: 'pointer'}}> {!small && projectsStore.items?.find(project => project._id === projectsStore.sessionProject)?.title} { > - setSearchInputValue(event.target.value)} @@ -80,26 +85,28 @@ export const ProjectSwitch = ({small}) => { )}> - {projectsStore.items?.filter(project => project.title.toLowerCase() - .includes(searchInputValue.toLowerCase())) - .map(project => ( + {projectsStore.items?.filter(project => + project.title.toLowerCase().includes(searchInputValue.toLowerCase())) + .map((project, idx) => ( handleProjectSelect(project._id)} > {project.title} ))} - + handleProjectSelect()} - sx={{color: theme.palette.primary.main, mb: 2}} + onClick={handleProjectSelect} + sx={{color: theme.palette.primary.main}} id='create_project_button'>