mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 17:02:38 +01:00
Fix default url not redirecting in studio page (#4592)
This commit is contained in:
parent
f5a42ede2d
commit
777fb44ac6
1 changed files with 1 additions and 3 deletions
|
|
@ -67,8 +67,6 @@ const validTabs = [
|
||||||
] as const;
|
] as const;
|
||||||
type TabKey = (typeof validTabs)[number];
|
type TabKey = (typeof validTabs)[number];
|
||||||
|
|
||||||
const defaultTab: TabKey = "default";
|
|
||||||
|
|
||||||
function isTabKey(tab: string): tab is TabKey {
|
function isTabKey(tab: string): tab is TabKey {
|
||||||
return validTabs.includes(tab as TabKey);
|
return validTabs.includes(tab as TabKey);
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +149,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (tabKey === defaultTab) {
|
if (!tabKey) {
|
||||||
setTabKey(populatedDefaultTab);
|
setTabKey(populatedDefaultTab);
|
||||||
}
|
}
|
||||||
}, [setTabKey, populatedDefaultTab, tabKey]);
|
}, [setTabKey, populatedDefaultTab, tabKey]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue