small
This commit is contained in:
parent
a60b496ce7
commit
d67b50edf4
@ -48,10 +48,12 @@ type GalleryState = {
|
|||||||
export const GalleryInfo = (props: GalleryProp)=>{
|
export const GalleryInfo = (props: GalleryProp)=>{
|
||||||
const [state,setState]= useState<GalleryState>({content:undefined});
|
const [state,setState]= useState<GalleryState>({content:undefined});
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
(async ()=>{
|
const load = (async ()=>{
|
||||||
const c = await ContentAccessor.findList(props.option);
|
const c = await ContentAccessor.findList(props.option);
|
||||||
|
//todo : if c is undefined, retry to fetch 3 times. and show error message.
|
||||||
setState({content:c});
|
setState({content:c});
|
||||||
})()
|
})
|
||||||
|
load();
|
||||||
},[props.option]);
|
},[props.option]);
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const queryString = toQueryString(props.option||{});
|
const queryString = toQueryString(props.option||{});
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import {Box, CircularProgress} from '@material-ui/core';
|
import {Box, CircularProgress} from '@material-ui/core';
|
||||||
|
|
||||||
export const LoadingCircle = ()=>{
|
export const LoadingCircle = ()=>{
|
||||||
return (<Box>
|
return (<Box style={{alignSelf:'center'}}>
|
||||||
<CircularProgress title="loading"/>
|
<CircularProgress title="loading"/>
|
||||||
</Box>);
|
</Box>);
|
||||||
}
|
}
|
@ -34,7 +34,6 @@ export const ContentAbout = (prop: { match: MatchType }) => {
|
|||||||
}
|
}
|
||||||
const id = Number.parseInt(match.params['id']);
|
const id = Number.parseInt(match.params['id']);
|
||||||
const [info, setInfo] = useState<ContentState>({ content: undefined, notfound:false });
|
const [info, setInfo] = useState<ContentState>({ content: undefined, notfound:false });
|
||||||
const history = useHistory();
|
|
||||||
const menu_list = (link?:string)=>(
|
const menu_list = (link?:string)=>(
|
||||||
<NavList>
|
<NavList>
|
||||||
<BackItem to={link}/>
|
<BackItem to={link}/>
|
||||||
|
Loading…
Reference in New Issue
Block a user