useRecoilState -> useRecoilValue 변경

This commit is contained in:
minsik 2024-11-06 15:46:23 +09:00
parent fe85629819
commit d921078aaa

View File

@ -1,10 +1,10 @@
'use client' 'use client'
import { useRecoilState } from 'recoil' import { useRecoilValue } from 'recoil'
import { popupState } from '@/store/popupAtom' import { popupState } from '@/store/popupAtom'
import { Fragment } from 'react' import { Fragment } from 'react'
export default function PopupManager() { export default function PopupManager() {
const [popup, setPopup] = useRecoilState(popupState) const popup = useRecoilValue(popupState)
return [ return [
...popup?.config.map((child) => <Fragment key={child.id}>{child.component}</Fragment>), ...popup?.config.map((child) => <Fragment key={child.id}>{child.component}</Fragment>),