This commit is contained in:
monoid 2021-01-10 19:05:32 +09:00
parent a60b496ce7
commit d67b50edf4
3 changed files with 5 additions and 4 deletions

View File

@ -48,10 +48,12 @@ type GalleryState = {
export const GalleryInfo = (props: GalleryProp)=>{
const [state,setState]= useState<GalleryState>({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||{});

View File

@ -2,7 +2,7 @@ import React from 'react';
import {Box, CircularProgress} from '@material-ui/core';
export const LoadingCircle = ()=>{
return (<Box>
return (<Box style={{alignSelf:'center'}}>
<CircularProgress title="loading"/>
</Box>);
}

View File

@ -34,7 +34,6 @@ export const ContentAbout = (prop: { match: MatchType }) => {
}
const id = Number.parseInt(match.params['id']);
const [info, setInfo] = useState<ContentState>({ content: undefined, notfound:false });
const history = useHistory();
const menu_list = (link?:string)=>(
<NavList>
<BackItem to={link}/>