chore: app dir improvement (#4750)
* chore: remove constants package. * fix: useRouter import in editor. * chore: improve `peekCycle` and `peekModule` logic. * style: update app progress bar color.
This commit is contained in:
parent
a88f2e3cba
commit
7ac07b7b73
14 changed files with 10 additions and 394 deletions
|
|
@ -142,7 +142,7 @@ export const CyclesBoardCard: FC<ICyclesBoardCard> = observer((props) => {
|
|||
if (searchParams.has("peekCycle")) {
|
||||
router.push(`${pathname}?${query}`);
|
||||
} else {
|
||||
router.push(`${pathname}?${query}&peekCycle=${cycleId}`);
|
||||
router.push(`${pathname}?${query && `${query}&`}peekCycle=${cycleId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ export const CyclesListItem: FC<TCyclesListItem> = observer((props) => {
|
|||
if (searchParams.has("peekCycle")) {
|
||||
router.push(`${pathname}?${query}`);
|
||||
} else {
|
||||
router.push(`${pathname}?${query}&peekCycle=${cycleId}`);
|
||||
router.push(`${pathname}?${query && `${query}&`}peekCycle=${cycleId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ export const ModuleCardItem: React.FC<Props> = observer((props) => {
|
|||
if (searchParams.has("peekModule")) {
|
||||
router.push(`${pathname}?${query}`);
|
||||
} else {
|
||||
router.push(`${pathname}?${query}&peekModule=${moduleId}`);
|
||||
router.push(`${pathname}?${query && `${query}&`}peekModule=${moduleId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export const ModuleListItem: React.FC<Props> = observer((props) => {
|
|||
if (searchParams.has("peekModule")) {
|
||||
router.push(`${pathname}?${query}`);
|
||||
} else {
|
||||
router.push(`${pathname}?${query}&peekModule=${moduleId}`);
|
||||
router.push(`${pathname}?${query && `${query}&`}peekModule=${moduleId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue