mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: always dimiss select state regardless of modification #341
This commit is contained in:
parent
a7defca2c3
commit
53bae7cbb3
4 changed files with 6 additions and 5 deletions
|
|
@ -52,7 +52,6 @@ function ChapterElement(props: ChapterElementProps) {
|
|||
|
||||
async function updateChapterName(chapterId: string) {
|
||||
if (modifiedChapter?.chapterId === chapterId) {
|
||||
setSelectedChapter(undefined)
|
||||
let modifiedChapterCopy = {
|
||||
name: modifiedChapter.chapterName,
|
||||
}
|
||||
|
|
@ -61,6 +60,7 @@ function ChapterElement(props: ChapterElementProps) {
|
|||
await revalidateTags(['courses'], props.orgslug)
|
||||
router.refresh()
|
||||
}
|
||||
setSelectedChapter(undefined)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue