Fix app installation error redirection (#3943)

This commit is contained in:
Lukasz Ostrowski 2023-07-17 20:37:52 +02:00 committed by GitHub
parent a7d39d7f19
commit 1c7486818b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View file

@ -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.

View file

@ -39,4 +39,3 @@ export const AppInstallErrorPage: React.FC<AppInstallErrorPageProps> = ({
);
};
export default AppInstallErrorPage;

View file

@ -1,2 +1 @@
export * from "./AppInstallErrorPage";
export { default } from "./AppInstallErrorPage";

View file

@ -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<Props> = ({ params }) => {
<WindowTitle title={intl.formatMessage(messages.installApp)} />
{!!fetchManifestOpts.data?.appFetchManifest?.errors?.length ||
!!fetchManifestOpts.error ? (
<AppInstallErrorPage onBack={() => navigate("/")} />
<AppInstallErrorPage onBack={navigateToAppsList} />
) : (
<AppInstallPage
data={fetchManifestOpts?.data?.appFetchManifest?.manifest ?? null}