mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Force history refresh
This commit is contained in:
parent
79cd5c55b1
commit
11a93dd7aa
@ -22,9 +22,16 @@ const HistoryDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElemen
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const client: Client = useSelector(activeInstance);
|
const client: Client = useSelector(activeInstance);
|
||||||
const { data } = useQuery<unknown, ErrorInfo, ChangeHistory[]>(`history-${mapId}`, () => {
|
const { data } = useQuery<unknown, ErrorInfo, ChangeHistory[]>(
|
||||||
return client.fetchHistory(mapId);
|
`history-${mapId}`,
|
||||||
});
|
() => {
|
||||||
|
return client.fetchHistory(mapId);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cacheTime: 0, // Force reload...
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const changeHistory: ChangeHistory[] = data ? data : [];
|
const changeHistory: ChangeHistory[] = data ? data : [];
|
||||||
|
|
||||||
const handleOnClose = (): void => {
|
const handleOnClose = (): void => {
|
||||||
|
Loading…
Reference in New Issue
Block a user