added the logo

This commit is contained in:
ROSHAN GARG 2024-07-19 13:33:26 +05:30
parent 1c0e661ceb
commit 823fbd7d19
3 changed files with 18 additions and 10 deletions

View File

@ -19,17 +19,19 @@ const ChangePassword = React.lazy(() => import('./views/pages/profile/ChangePass
const App = () => { const App = () => {
const { isColorModeSet, setColorMode } = useColorModes('coreui-free-react-admin-template-theme') const { isColorModeSet, setColorMode } = useColorModes('coreui-free-react-admin-template-theme')
const storedTheme = useSelector((state) => state.theme) const storedTheme = useSelector((state) => state.theme)
console.log('theme1', storedTheme)
useEffect(() => { useEffect(() => {
const urlParams = new URLSearchParams(window.location.href.split('?')[1]) // const urlParams = new URLSearchParams(window.location.href.split('?')[1])
const theme = urlParams.get('theme') && urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0] // const theme = urlParams.get('theme') && urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
if (theme) { // console.log('theme', theme)
setColorMode(theme) // if () {
} // setColorMode(theme)
// }
if (isColorModeSet()) { // if (isColorModeSet()) {
return // return
} // }
setColorMode(storedTheme) setColorMode(storedTheme)
}, []) // eslint-disable-line react-hooks/exhaustive-deps }, []) // eslint-disable-line react-hooks/exhaustive-deps

BIN
src/assets/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -13,7 +13,7 @@ import CIcon from '@coreui/icons-react'
import { AppSidebarNav } from './AppSidebarNav' import { AppSidebarNav } from './AppSidebarNav'
import { logo } from 'src/assets/brand/logo' import logo from 'src/assets/logo.jpg'
import { sygnet } from 'src/assets/brand/sygnet' import { sygnet } from 'src/assets/brand/sygnet'
// sidebar nav config // sidebar nav config
@ -37,7 +37,13 @@ const AppSidebar = () => {
> >
<CSidebarHeader className="border-bottom"> <CSidebarHeader className="border-bottom">
<CSidebarBrand to="/"> <CSidebarBrand to="/">
<CIcon customClassName="sidebar-brand-full" icon={logo} height={32} /> {/* <CIcon customClassName="sidebar-brand-full" icon={logo} height={32} /> */}
<img
className="sidebar-brand-full"
src={logo}
height={32}
style={{ marginLeft: '-0.8rem' }}
/>
<CIcon customClassName="sidebar-brand-narrow" icon={sygnet} height={32} /> <CIcon customClassName="sidebar-brand-narrow" icon={sygnet} height={32} />
</CSidebarBrand> </CSidebarBrand>
<CCloseButton <CCloseButton