'use client'

import { useRecoilValue } from 'recoil'
import { dimmedStore } from '@/store/commonAtom'

export default function Dimmed() {
  const dimmedState = useRecoilValue(dimmedStore)

  const isDimmed = dimmedState ? 'fixed top-0 left-0 w-full h-full z-100 opacity-50 bg-black' : ''
  return <div className={isDimmed}></div>
}
