Skip to content

Commit e30c456

Browse files
committed
style: Add comments
1 parent 073b534 commit e30c456

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/course-outline/data/apiHooks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ export const useCreateCourseBlock = (
129129
});
130130
await invalidateParentQueries(queryClient, variables);
131131
// Invalidate tags count for the newly created block
132+
// Strips "+type@<blockType>+block@<id>" to produce a course-run wildcard, e.g.
133+
// "block-v1:org+course+run+type@vertical+block@abc" → "block-v1:org+course+run*"
132134
const contentPattern = data.locator.replace(/\+type@.*$/, '*');
133135
queryClient.invalidateQueries({ queryKey: ['contentTagsCount', contentPattern] });
134136
// scroll to newly added block

0 commit comments

Comments
 (0)