diff --git a/src/client/component/galleryinfo.tsx b/src/client/component/galleryinfo.tsx index 5a28888..e9f3fe4 100644 --- a/src/client/component/galleryinfo.tsx +++ b/src/client/component/galleryinfo.tsx @@ -48,10 +48,12 @@ type GalleryState = { export const GalleryInfo = (props: GalleryProp)=>{ const [state,setState]= useState({content:undefined}); useEffect(()=>{ - (async ()=>{ + const load = (async ()=>{ const c = await ContentAccessor.findList(props.option); + //todo : if c is undefined, retry to fetch 3 times. and show error message. setState({content:c}); - })() + }) + load(); },[props.option]); const classes = useStyles(); const queryString = toQueryString(props.option||{}); diff --git a/src/client/component/loading.tsx b/src/client/component/loading.tsx index b9a50fa..639c191 100644 --- a/src/client/component/loading.tsx +++ b/src/client/component/loading.tsx @@ -2,7 +2,7 @@ import React from 'react'; import {Box, CircularProgress} from '@material-ui/core'; export const LoadingCircle = ()=>{ - return ( + return ( ); } \ No newline at end of file diff --git a/src/client/page/contentinfo.tsx b/src/client/page/contentinfo.tsx index b377e95..e57a5b5 100644 --- a/src/client/page/contentinfo.tsx +++ b/src/client/page/contentinfo.tsx @@ -34,7 +34,6 @@ export const ContentAbout = (prop: { match: MatchType }) => { } const id = Number.parseInt(match.params['id']); const [info, setInfo] = useState({ content: undefined, notfound:false }); - const history = useHistory(); const menu_list = (link?:string)=>(