From a3a8e85a4200e0495285cbf8befe9c407760d11b Mon Sep 17 00:00:00 2001 From: Ahmed Mehri Date: Tue, 23 Jul 2024 10:19:12 +0200 Subject: [PATCH] chore: forward application context project's isProductionProject (#3571) * feat: forward application context project's isProductionProject * chore: add changeset * test: fix test * docs: simplify changeset --------- Co-authored-by: Nicola Molinari --- .changeset/dry-eagles-sin.md | 5 +++++ .../application-context/application-context.spec.tsx | 1 + .../components/application-context/application-context.tsx | 1 + 3 files changed, 7 insertions(+) create mode 100644 .changeset/dry-eagles-sin.md diff --git a/.changeset/dry-eagles-sin.md b/.changeset/dry-eagles-sin.md new file mode 100644 index 0000000000..45ec146997 --- /dev/null +++ b/.changeset/dry-eagles-sin.md @@ -0,0 +1,5 @@ +--- +"@commercetools-frontend/application-shell-connectors": patch +--- + +Expose field `isProductionProject` to `ApplicationContext`. diff --git a/packages/application-shell-connectors/src/components/application-context/application-context.spec.tsx b/packages/application-shell-connectors/src/components/application-context/application-context.spec.tsx index 8005e2febf..986f6d2336 100644 --- a/packages/application-shell-connectors/src/components/application-context/application-context.spec.tsx +++ b/packages/application-shell-connectors/src/components/application-context/application-context.spec.tsx @@ -281,6 +281,7 @@ describe('mapProjectToApplicationContextProject', () => { ownerName: expect.any(String), sampleDataImportDataset: expect.any(String), isUserAdminOfCurrentProject: expect.any(Boolean), + isProductionProject: expect.any(Boolean), }); }); }); diff --git a/packages/application-shell-connectors/src/components/application-context/application-context.tsx b/packages/application-shell-connectors/src/components/application-context/application-context.tsx index 483ac0b98e..03e543e0ef 100644 --- a/packages/application-shell-connectors/src/components/application-context/application-context.tsx +++ b/packages/application-shell-connectors/src/components/application-context/application-context.tsx @@ -148,6 +148,7 @@ export const mapProjectToApplicationContextProject = ( ownerName: project.owner.name, sampleDataImportDataset: project.sampleDataImportDataset, isUserAdminOfCurrentProject: project.isUserAdminOfCurrentProject, + isProductionProject: project.isProductionProject, }; };