( client: QueryClient, user: Pick<LoggedUser, 'id'> | undefined, postId: string, isHidden: boolean, )
| 82 | * does: a hidden card turns into its hidden panel. |
| 83 | */ |
| 84 | export const setPostHiddenPanel = ( |
| 85 | client: QueryClient, |
| 86 | user: Pick<LoggedUser, 'id'> | undefined, |
| 87 | postId: string, |
| 88 | isHidden: boolean, |
| 89 | ): void => { |
| 90 | client.setQueryData<BlockData>( |
| 91 | getBlockPanelQueryKey(user, postId), |
| 92 | (current) => ({ |
| 93 | ...current, |
| 94 | showTagsPanel: isHidden || undefined, |
| 95 | mode: 'hide', |
| 96 | }), |
| 97 | ); |
| 98 | }; |
| 99 | |
| 100 | export const useBlockPostPanel = ( |
| 101 | post: Post | ReadHistoryPost, |
no test coverage detected