Skip to content

Commit

Permalink
fix: redirect the setup page when Jellyseerr is already setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthier-th committed Aug 20, 2024
1 parent dc34d6c commit dd2c752
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Setup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,21 @@ const Setup = () => {
});

useEffect(() => {
if (settings.currentSettings.initialized) {
router.push('/');
}
if (
settings.currentSettings.mediaServerType !==
MediaServerType.NOT_CONFIGURED
) {
setCurrentStep(3);
setMediaServerType(settings.currentSettings.mediaServerType);
}
}, [settings.currentSettings.mediaServerType]);
}, [
settings.currentSettings.mediaServerType,
settings.currentSettings.initialized,
router,
]);

return (
<div className="relative flex min-h-screen flex-col justify-center bg-gray-900 py-12">
Expand Down

0 comments on commit dd2c752

Please sign in to comment.