From ee663bc72cf41b22d1428fb9dc83a710ef20ddb0 Mon Sep 17 00:00:00 2001 From: Abhinav-grd Date: Tue, 2 Feb 2021 18:09:36 +0530 Subject: [PATCH] added new state errorCode and added errorAlert component to gallery --- src/pages/gallery/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/gallery/index.tsx b/src/pages/gallery/index.tsx index c58607c51..06f4f4954 100644 --- a/src/pages/gallery/index.tsx +++ b/src/pages/gallery/index.tsx @@ -21,6 +21,7 @@ import SadFace from 'components/SadFace'; import Upload from './components/Upload'; import { collection, fetchCollections, collectionLatestFile, getCollectionLatestFile, getFavItemIds } from 'services/collectionService'; import constants from 'utils/strings/constants'; +import { ErrorAlert } from './components/ErrorAlert'; enum ITEM_TYPE { TIME = 'TIME', @@ -105,7 +106,7 @@ export default function Gallery(props) { maxSpreadZoom: 5, }); const fetching: { [k: number]: boolean } = {}; - + const [errorCode, setErrorCode] = useState(null); useEffect(() => { @@ -285,6 +286,7 @@ export default function Gallery(props) { return ( <> + setReload(Math.random())} - + setErrorCode={setErrorCode} + /> {filteredData.length ? (