From 1c7486818b15379225682604f7ceec99f123c55e Mon Sep 17 00:00:00 2001 From: Lukasz Ostrowski Date: Mon, 17 Jul 2023 20:37:52 +0200 Subject: [PATCH] Fix app installation error redirection (#3943) --- .changeset/hungry-buses-pump.md | 5 +++++ .../components/AppInstallErrorPage/AppInstallErrorPage.tsx | 1 - src/apps/components/AppInstallErrorPage/index.ts | 1 - src/apps/views/AppInstallView/AppInstallView.tsx | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changeset/hungry-buses-pump.md diff --git a/.changeset/hungry-buses-pump.md b/.changeset/hungry-buses-pump.md new file mode 100644 index 000000000..35eaf6822 --- /dev/null +++ b/.changeset/hungry-buses-pump.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Once app installation failed, error page redirected to Dashboard root. Now it's fixed - failed installation redirects to the Apps page. diff --git a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx index 983bd411e..8fb616734 100644 --- a/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx +++ b/src/apps/components/AppInstallErrorPage/AppInstallErrorPage.tsx @@ -39,4 +39,3 @@ export const AppInstallErrorPage: React.FC = ({ ); }; -export default AppInstallErrorPage; diff --git a/src/apps/components/AppInstallErrorPage/index.ts b/src/apps/components/AppInstallErrorPage/index.ts index c49180823..6fd11f8ae 100644 --- a/src/apps/components/AppInstallErrorPage/index.ts +++ b/src/apps/components/AppInstallErrorPage/index.ts @@ -1,2 +1 @@ export * from "./AppInstallErrorPage"; -export { default } from "./AppInstallErrorPage"; diff --git a/src/apps/views/AppInstallView/AppInstallView.tsx b/src/apps/views/AppInstallView/AppInstallView.tsx index 5620d204a..a04cad7bd 100644 --- a/src/apps/views/AppInstallView/AppInstallView.tsx +++ b/src/apps/views/AppInstallView/AppInstallView.tsx @@ -1,4 +1,4 @@ -import AppInstallErrorPage from "@dashboard/apps/components/AppInstallErrorPage"; +import {AppInstallErrorPage} from "@dashboard/apps/components/AppInstallErrorPage"; import AppInstallPage from "@dashboard/apps/components/AppInstallPage"; import { AppInstallUrlQueryParams, @@ -100,7 +100,7 @@ export const AppInstallView: React.FC = ({ params }) => { {!!fetchManifestOpts.data?.appFetchManifest?.errors?.length || !!fetchManifestOpts.error ? ( - navigate("/")} /> + ) : (