Skip to content

Commit 3d847ab

Browse files
committed
Fix incorrect hook usage in Wikidata example
1 parent d7d7535 commit 3d847ab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/examples/PlaygroundWikidata.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ export function PlaygroundWikidata() {
8181
}
8282

8383
function ClearWikidataCacheAction() {
84+
const {model} = Reactodia.useWorkspace();
8485
return (
8586
<Reactodia.ToolbarAction
8687
title='Clear locally-cached data previously fetched from Wikidata'
8788
onSelect={() => {
88-
const {model: {dataProvider}} = Reactodia.useWorkspace();
89+
const {dataProvider} = model;
8990
if (dataProvider instanceof Reactodia.IndexedDbCachedProvider) {
9091
dataProvider.clearCache();
9192
}

0 commit comments

Comments
 (0)