Sfoglia il codice sorgente

fix: fix useRequest error

chenshuai2144 5 anni fa
parent
commit
12cf2f9a62
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 || []);