chore: ensure compat type definitions do not break existing types (#11741)
This commit is contained in:
1 parent
0f92afb4bd
commit
39c3ef0d94
8 files changed
+31
-12
No files matched your search
@@ -95,7 +95,9 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr
|
||||
ref={ref}>
|
||||
<li
|
||||
onClick={() => {
|
||||
router.replace(pathname);
|
||||
if (pathname !== null) {
|
||||
router.replace(pathname);
|
||||
}
|
||||
}}
|
||||
className={classNames(
|
||||
selectedCategory === null ? "bg-emphasis text-default" : "bg-muted text-emphasis",
|
||||
@@ -108,9 +110,11 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr
|
||||
key={pos}
|
||||
onClick={() => {
|
||||
if (selectedCategory === cat) {
|
||||
router.replace(pathname);
|
||||
if (pathname !== null) {
|
||||
router.replace(pathname);
|
||||
}
|
||||
} else {
|
||||
const _searchParams = new URLSearchParams(searchParams);
|
||||
const _searchParams = new URLSearchParams(searchParams ?? undefined);
|
||||
_searchParams.set("category", cat);
|
||||
router.replace(`${pathname}?${_searchParams.toString()}`);
|
||||
}
|
||||
|
||||
@@ -190,7 +190,9 @@ const InstallAppButtonChild = ({
|
||||
const mutation = useAddAppMutation(null, {
|
||||
onSuccess: (data) => {
|
||||
// Refresh SSR page content without actual reload
|
||||
router.replace(pathname);
|
||||
if (pathname !== null) {
|
||||
router.replace(pathname);
|
||||
}
|
||||
if (data?.setupPending) return;
|
||||
showToast(t("app_successfully_installed"), "success");
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user