Skip to content

Commit

Permalink
fix: tag worker sync, accordion folder hook syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
zovomat committed Apr 12, 2022
1 parent f241ccf commit e462b9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/store/folder/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const useFoldersByView = (view: FolderView): Array<Folder> => {

export const useFoldersAccordionByView = (
view: FolderView,
customComponent: ComponentType<{ folder: Folder }>
CustomComponent: ComponentType<{ folder: Folder }>
): Array<AccordionFolder> => {
const roots = useRoots();
const mapped = useMemo(
Expand All @@ -69,7 +69,7 @@ export const useFoldersAccordionByView = (
mapFunction: (f) => ({
id: f.id,
label: f.name,
customComponent,
CustomComponent,
items: [],
folder: f
}),
Expand All @@ -78,7 +78,7 @@ export const useFoldersAccordionByView = (
sortFunction: sortFolders
})
: [],
[customComponent, roots, view]
[CustomComponent, roots, view]
);
return mapped;
};
2 changes: 1 addition & 1 deletion src/store/network/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const handleSync = ({ refresh, notify }: SoapContext): Promise<void> =>
if (refresh) {
tagWorker.postMessage({
op: 'refresh',
tags: refresh.tags?.tag ?? []
tags: refresh.tags
});
folderWorker.postMessage({
op: 'refresh',
Expand Down
2 changes: 1 addition & 1 deletion types/exports/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,5 @@ export const useFoldersByView: (view: string) => Array<Folder>;

export const useFoldersAccordionByView: (
view: string,
customComponent: ComponentType<{ folder: Folder }>
CustomComponent: ComponentType<{ folder: Folder }>
) => Array<AccordionFolder>;
2 changes: 1 addition & 1 deletion types/misc/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export type AccordionFolder = {
id: string;
label: string;
folder: Folder;
customComponent: ComponentType<{ folder: Folder }>;
CustomComponent: ComponentType<{ folder: Folder }>;
items: Array<AccordionFolder>;
};

Expand Down

0 comments on commit e462b9b

Please sign in to comment.