Skip to content

Commit

Permalink
Merge pull request #75 from AstraProtocol/fix/disable-switch-theme
Browse files Browse the repository at this point in the history
fix: disable switch theme button
  • Loading branch information
viennguyen2-tiki authored Mar 2, 2023
2 parents d01e548 + 1dbd818 commit 216038a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 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
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ const sentryWebpackPluginOptions = {
// https://github.com/getsentry/sentry-webpack-plugin#options.
}

module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions)
module.exports =
process.env.NEXT_PUBLIC_ENV === 'mainnet' ? withSentryConfig(moduleExports, sentryWebpackPluginOptions) : nextConfig

0 comments on commit 216038a

Please sign in to comment.