Fix found bugs during demo

This commit is contained in:
Dave Richer
2023-12-12 13:38:23 -05:00
parent fe80256a40
commit 95c9978ee7
8 changed files with 96 additions and 97 deletions

View File

@@ -25,10 +25,12 @@ export function TechPageContainer({ bodyshop, setBodyshop }) {
nextFetchPolicy: "network-only",
});
const { t } = useTranslation();
useEffect(() => {
if (data) setBodyshop(data.bodyshops[0]);
}, [data, setBodyshop]);
if (loading || !bodyshop)
return <LoadingSpinner message={t("general.labels.loadingshop")} />;
if (error) return <AlertComponent message={error.message} type="error" />;