mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-30 15:16:39 +08:00
24 lines
676 B
JavaScript
24 lines
676 B
JavaScript
import { Link } from 'react-router-dom';
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
// material-ui
|
|
import { ButtonBase } from '@mui/material';
|
|
|
|
// project imports
|
|
import Logo from 'ui-component/Logo';
|
|
import { MENU_OPEN } from 'store/actions';
|
|
|
|
// ==============================|| MAIN LOGO ||============================== //
|
|
|
|
const LogoSection = () => {
|
|
const defaultId = useSelector((state) => state.customization.defaultId);
|
|
const dispatch = useDispatch();
|
|
return (
|
|
<ButtonBase disableRipple onClick={() => dispatch({ type: MENU_OPEN, id: defaultId })} component={Link} to="/">
|
|
<Logo />
|
|
</ButtonBase>
|
|
);
|
|
};
|
|
|
|
export default LogoSection;
|