Browse Source

fix: fix useRequest error

chenshuai2144 5 năm trước cách đây
mục cha
commit
12cf2f9a62
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/components/NoticeIcon/index.tsx

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

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