Skip to content

Commit

Permalink
Merge pull request #447 from dot-mike/fix/curation-prop-state
Browse files Browse the repository at this point in the history
Fix curatation prop state
  • Loading branch information
colin969 authored Dec 31, 2024
2 parents d5eafe8 + 57f7b67 commit a4497e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderer/components/CurateBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function CurateBox(props: CurateBoxProps) {
}));
}
props.onTagTextChange('');
}, [props.curation.folder]);
}, [props.curation.folder, props.curation.game.tags]);

const onAddPlatform = React.useCallback((platform: Platform) => {
const platforms = props.curation.game.platforms || [];
Expand All @@ -204,22 +204,22 @@ export function CurateBox(props: CurateBoxProps) {
}));
}
props.onPlatformTextChange('');
}, [props.curation.folder]);
}, [props.curation.folder, props.curation.game.platforms]);

const onRemoveTag = React.useCallback((tagId: number) => {
dispatch(removeTag({
folder,
tagId
}));
}, [props.curation.folder]);
}, [props.curation.folder, props.curation.game.tags]);

const onRemovePlatform = React.useCallback((platformId) => {
dispatch(removePlatform({
folder,
platformId,
platformAppPaths: props.platformAppPaths
}));
}, [props.curation.folder]);
}, [props.curation.folder, props.curation.game.platforms]);

const onToggleContentNodeView = React.useCallback((tree: string[]) => {
dispatch(toggleContentNodeView({
Expand Down

0 comments on commit a4497e9

Please sign in to comment.