diff --git a/.github/workflows/deploy-prod.yaml b/.github/workflows/deploy-prod.yaml index 1385f4c49..b67782837 100644 --- a/.github/workflows/deploy-prod.yaml +++ b/.github/workflows/deploy-prod.yaml @@ -25,6 +25,7 @@ jobs: ENVIRONMENT: ${{ github.event.inputs.service_name }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + IS_CLOUD_INSTANCE: true steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/deploy-staging.yaml b/.github/workflows/deploy-staging.yaml index ed6f169b5..3072a1583 100644 --- a/.github/workflows/deploy-staging.yaml +++ b/.github/workflows/deploy-staging.yaml @@ -24,6 +24,7 @@ jobs: SENTRY_URL_PREFIX: "~/dashboard/static" SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + IS_CLOUD_INSTANCE: true steps: - name: Set env variables run: | diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml index c9d70388b..560133ea8 100644 --- a/.github/workflows/test-env-deploy.yml +++ b/.github/workflows/test-env-deploy.yml @@ -62,6 +62,7 @@ jobs: API_URI: ${{ steps.api_uri.outputs.custom_api_uri || 'https://qa.staging.saleor.cloud/graphql/' }} APP_MOUNT_URI: / STATIC_URL: / + IS_CLOUD_INSTANCE: true run: | npm run build diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index d67df3685..4433ea235 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -6726,14 +6726,14 @@ "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_1008586926": { "string": "Name of your store is shown on tab in web browser" }, - "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_1987367127": { - "string": "Store Description" + "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_1170194728": { + "string": "Store domain" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_2286355060": { "string": "Name of your store" }, - "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_3808773492": { - "string": "URL of your online store" + "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_3868874271": { + "string": "Store description" }, "src_dot_siteSettings_dot_components_dot_SiteSettingsDetails_dot_529433178": { "string": "Store description is shown on taskbar after your store name" diff --git a/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.stories.tsx b/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.stories.tsx index 8665d545e..d48e3a8cd 100644 --- a/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.stories.tsx +++ b/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.stories.tsx @@ -8,7 +8,6 @@ import AppDetailsSettingsPage, { } from "./AppDetailsSettingsPage"; const props: AppDetailsSettingsPageProps = { - backendHost: "host", data: appDetails, navigateToDashboard: () => undefined, onBack: () => undefined, diff --git a/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx b/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx index a9efff6e0..cd9755c7e 100644 --- a/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx +++ b/src/apps/components/AppDetailsSettingsPage/AppDetailsSettingsPage.tsx @@ -5,7 +5,6 @@ import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; import { sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; -import { useTheme } from "@saleor/macaw-ui"; import classNames from "classnames"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -16,7 +15,6 @@ import { useStyles } from "./styles"; import useSettingsBreadcrumbs from "./useSettingsBreadcrumbs"; export interface AppDetailsSettingsPageProps { - backendHost: string; data: App_app; navigateToDashboard: () => void; onBack: () => void; @@ -24,7 +22,6 @@ export interface AppDetailsSettingsPageProps { } export const AppDetailsSettingsPage: React.FC = ({ - backendHost, data, navigateToDashboard, onBack, @@ -33,7 +30,6 @@ export const AppDetailsSettingsPage: React.FC = ({ const intl = useIntl(); const classes = useStyles({}); const [breadcrumbs, onBreadcrumbClick] = useSettingsBreadcrumbs(); - const { sendThemeToExtension } = useTheme(); return ( @@ -104,9 +100,7 @@ export const AppDetailsSettingsPage: React.FC = ({ {data && ( )} diff --git a/src/apps/components/AppFrame/AppFrame.tsx b/src/apps/components/AppFrame/AppFrame.tsx index 505f7b6dc..2dbc20b42 100644 --- a/src/apps/components/AppFrame/AppFrame.tsx +++ b/src/apps/components/AppFrame/AppFrame.tsx @@ -1,3 +1,4 @@ +import useShop from "@saleor/hooks/useShop"; import { useTheme } from "@saleor/macaw-ui"; import React from "react"; import urlJoin from "url-join"; @@ -8,7 +9,6 @@ import { useAppActions } from "./useAppActions"; interface Props { src: string; appToken: string; - backendHost: string; onLoad?(): void; onError?(): void; } @@ -18,10 +18,10 @@ const getOrigin = (url: string) => new URL(url).origin; export const AppFrame: React.FC = ({ src, appToken, - backendHost, onLoad, onError }) => { + const shop = useShop(); const frameRef = React.useRef(); const { sendThemeToExtension } = useTheme(); const classes = useStyles(); @@ -43,10 +43,14 @@ export const AppFrame: React.FC = ({ } }; + if (!shop?.domain.host) { + return null; + } + return (