mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +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;
|
||||
type TabKey = (typeof validTabs)[number];
|
||||
|
||||
const defaultTab: TabKey = "default";
|
||||
|
||||
function isTabKey(tab: string): tab is TabKey {
|
||||
return validTabs.includes(tab as TabKey);
|
||||
}
|
||||
|
|
@ -151,7 +149,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (tabKey === defaultTab) {
|
||||
if (!tabKey) {
|
||||
setTabKey(populatedDefaultTab);
|
||||
}
|
||||
}, [setTabKey, populatedDefaultTab, tabKey]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue