mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Don't show studio error message while loading (#1791)
This commit is contained in:
@@ -49,7 +49,7 @@ export const Studio: React.FC = () => {
|
||||
// Studio state
|
||||
const [image, setImage] = useState<string | null>();
|
||||
|
||||
const { data, error } = useFindStudio(id);
|
||||
const { data, loading: studioLoading, error } = useFindStudio(id);
|
||||
const studio = data?.findStudio;
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@@ -198,7 +198,7 @@ export const Studio: React.FC = () => {
|
||||
}
|
||||
};
|
||||
|
||||
if (isLoading) return <LoadingIndicator />;
|
||||
if (isLoading || studioLoading) return <LoadingIndicator />;
|
||||
if (error) return <ErrorMessage error={error.message} />;
|
||||
if (!studio?.id && !isNew)
|
||||
return <ErrorMessage error={`No studio found with id ${id}.`} />;
|
||||
|
||||
Reference in New Issue
Block a user