Skip to content

Commit

Permalink
fix: fix blurry effect
Browse files Browse the repository at this point in the history
  • Loading branch information
musshal committed May 24, 2024
1 parent 759f3c1 commit 69cd2b4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion components/organisms/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useTheme } from 'next-themes';
import SubHeroContent from '../molecules/SubHeroContent';
import SubHeroImage from '../molecules/SubHeroImage';
import { useEffect, useState } from 'react';

export default function HeroSection({
heroHeading,
Expand All @@ -22,11 +23,22 @@ export default function HeroSection({
communityHashtags: any;
}) {
const { resolvedTheme } = useTheme();
const [localStorageTheme, setLocalStorageTheme] = useState('');

useEffect(() => {
const theme = window.localStorage.getItem('theme');
setLocalStorageTheme(theme ? theme : '');
}, []);

return (
<section className="px-5 pt-14 bg-[#FAFBFD] dark:bg-gray-900">
<div
className={`
${resolvedTheme === 'dark' ? 'block' : 'hidden md:hidden'}
${
resolvedTheme === 'dark' && localStorageTheme === 'dark'
? 'block'
: 'hidden md:hidden'
}
-z-0
md:block
bg-[#28f3dfce]
Expand Down

0 comments on commit 69cd2b4

Please sign in to comment.