Browse Source

fix: fix useRequest error

chenshuai2144 4 năm trước cách đây
mục cha
commit
12cf2f9a62

+ 1 - 1
src/components/NoticeIcon/index.tsx

@@ -74,7 +74,7 @@ const NoticeIconView = () => {
   const { initialState } = useModel('@@initialState');
   const { initialState } = useModel('@@initialState');
   const { currentUser } = initialState || {};
   const { currentUser } = initialState || {};
   const [notices, setNotices] = useState<API.NoticeIconItem[]>([]);
   const [notices, setNotices] = useState<API.NoticeIconItem[]>([]);
-  const { data } = useRequest(getNotices());
+  const { data } = useRequest(getNotices);
 
 
   useEffect(() => {
   useEffect(() => {
     setNotices(data || []);
     setNotices(data || []);