saleor-dashboard/src/marketplace/index.tsx
Wojciech Mista c922dfb6fe
Application Marketplace available in dashboard (#2054)
* Add marketplace

* Update messages

* Extract styles

* Update test env

* Update config and rename uri

* Update template

* Trigger CI

* Possible fix

* Update deploy yml

* Add marketplace to staging

* Fix responsiveness

* Trigger CI

* Fix navigation tests (#2081)

* fix navigate through shop

* wait for progress bar not to exist

* simplify code

* add wait

* Fix navigate through shop (#2076)

* fix navigate through shop

* wait for progress bar not to exist

* simplify code

* Refine App about section (#2056)

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Fix app activation/deactivation

* Hide configuration url and policy if theres none

* Remove about and support links

* Remove unused code

* Update stories and tests

* Update messages

* Fix privacy policy

* Fix activation and "open app"

* Update tests

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2022-06-08 08:44:28 +02:00

38 lines
1 KiB
TypeScript

import { Container } from "@material-ui/core";
import { AppFrame } from "@saleor/apps/components/AppFrame";
import NotFoundPage from "@saleor/components/NotFoundPage";
import { WindowTitle } from "@saleor/components/WindowTitle";
import { MARKETPLACE_URL } from "@saleor/config";
import useNavigator from "@saleor/hooks/useNavigator";
import { sectionNames } from "@saleor/intl";
import React from "react";
import { useIntl } from "react-intl";
import { useStyles } from "./styles";
const Component = () => {
const classes = useStyles();
const intl = useIntl();
const navigate = useNavigator();
if (!MARKETPLACE_URL) {
return <NotFoundPage onBack={() => navigate("/")} />;
}
return (
<>
<WindowTitle title={intl.formatMessage(sectionNames.marketplace)} />
<Container>
<AppFrame
src={MARKETPLACE_URL}
// Marketplace doesn't require app token nor id
appToken=""
appId=""
className={classes.iframe}
/>
</Container>
</>
);
};
export default Component;