Skip to content

Commit

Permalink
fix: disable switch theme button
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Mar 2, 2023
1 parent 195e3c6 commit 5e182e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions components/Navbar/SwitchTheme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import clsx from 'clsx'
import { toast } from 'react-toastify'
import { selectTheme, ThemeEnum } from '../../../slices/themeSlice'
import { selectTheme, switchTheme, ThemeEnum } from '../../../slices/themeSlice'
import { useAppDispatch, useAppSelector } from '../../../store/hooks'
import styles from '../style.module.scss'
import DarkIcon from './icon/dark.svg'
Expand All @@ -11,8 +10,7 @@ export default function SwitchTheme() {
const dispatch = useAppDispatch()

const _changeTheme = () => {
toast.warn('In Development')
// dispatch(switchTheme())
dispatch(switchTheme())
}
return (
<div className={clsx(styles.switchTheme, 'margin-right-xs margin-left-xs')}>
Expand Down
3 changes: 1 addition & 2 deletions components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import LiveIcon from './LiveIcon'
import MoibleNavigation from './MobileNavigation'
import Navigation, { MenuItem } from './Navigation'
import styles from './style.module.scss'
import SwitchTheme from './SwitchTheme'

export default function Navbar() {
const { isMobile } = useMobileLayout('small')
Expand Down Expand Up @@ -146,7 +145,7 @@ export default function Navbar() {
<div className={styles.right}>
<Navigation items={items} />
<Search full={false} />
<SwitchTheme />
{/* <SwitchTheme /> */}
</div>
</div>
</nav>
Expand Down

0 comments on commit 5e182e8

Please sign in to comment.