mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-22 11:43:48 +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 queryClient = useQueryClient();
|
||||
const client: Client = useSelector(activeInstance);
|
||||
const { data } = useQuery<unknown, ErrorInfo, ChangeHistory[]>(`history-${mapId}`, () => {
|
||||
return client.fetchHistory(mapId);
|
||||
});
|
||||
const { data } = useQuery<unknown, ErrorInfo, ChangeHistory[]>(
|
||||
`history-${mapId}`,
|
||||
() => {
|
||||
return client.fetchHistory(mapId);
|
||||
},
|
||||
{
|
||||
cacheTime: 0, // Force reload...
|
||||
},
|
||||
);
|
||||
|
||||
const changeHistory: ChangeHistory[] = data ? data : [];
|
||||
|
||||
const handleOnClose = (): void => {
|
||||
|
Loading…
Reference in New Issue
Block a user