diff --git a/apps/emails-and-messages/src/modules/ui/configuration-page-base-layout.tsx b/apps/emails-and-messages/src/modules/ui/configuration-page-base-layout.tsx index 78dc732..cd2bdc3 100644 --- a/apps/emails-and-messages/src/modules/ui/configuration-page-base-layout.tsx +++ b/apps/emails-and-messages/src/modules/ui/configuration-page-base-layout.tsx @@ -1,56 +1,15 @@ import React, { PropsWithChildren } from "react"; -import { Button, makeStyles, PageTab, PageTabs } from "@saleor/macaw-ui"; -import { GitHub, OfflineBoltOutlined } from "@material-ui/icons"; -import { actions, useAppBridge } from "@saleor/app-sdk/app-bridge"; -import { MainBar } from "../../modules/ui/main-bar"; -import { appBrandColor, appName } from "../../const"; -import Image from "next/image"; -import appIcon from "../../public/notification-hub.svg"; +import { makeStyles, PageTab, PageTabs } from "@saleor/macaw-ui"; import { useRouter } from "next/router"; const useStyles = makeStyles({ - buttonsGrid: { display: "flex", gap: 10 }, - topBar: { - marginBottom: 32, - }, - appIconContainer: { - background: appBrandColor, - padding: 10, - borderRadius: "50%", - width: 50, - height: 50, - display: "flex", - flexDirection: "column", - justifyContent: "center", - alignItems: "center", - color: "#fff", - }, + appContainer: { marginTop: 20 }, }); -const AppIcon = () => { - const styles = useStyles(); - - return ( -
- icon -
- ); -}; - type Props = PropsWithChildren<{}>; export const ConfigurationPageBaseLayout = ({ children }: Props) => { const styles = useStyles(); - const { appBridge } = useAppBridge(); - - const openInNewTab = (url: string) => { - appBridge?.dispatch( - actions.Redirect({ - to: url, - newContext: true, - }) - ); - }; const router = useRouter(); const tabs = [ @@ -77,35 +36,7 @@ export const ConfigurationPageBaseLayout = ({ children }: Props) => { } }; return ( -
- } - className={styles.topBar} - name={appName} - author="By Saleor Commerce" - rightColumnContent={ -
- - -
- } - /> +
({ - root: { - height: 96, - padding: "0 32px", - display: "flex", - alignItems: "center", - justifyContent: "space-between", - borderLeft: "none", - borderRight: "none", - borderTop: "none", - }, - leftColumn: { - marginRight: "auto", - }, - rightColumn: {}, - iconColumn: { - marginRight: 24, - }, - appName: { fontSize: 24, margin: 0 }, - appAuthor: { - fontSize: 12, - textTransform: "uppercase", - color: theme.palette.text.secondary, - fontWeight: 500, - margin: 0, - }, -})); - -type Props = { - name: string; - author: string; - rightColumnContent?: ReactNode; - icon?: ReactNode; -} & PaperProps; - -export const MainBar = ({ name, author, rightColumnContent, className, icon }: Props) => { - const styles = useStyles(); - - return ( - - {icon &&
{icon}
} -
-

{name}

-

{author}

-
-
{rightColumnContent}
-
- ); -}; diff --git a/apps/emails-and-messages/src/pages/api/manifest.ts b/apps/emails-and-messages/src/pages/api/manifest.ts index 143e754..a523586 100644 --- a/apps/emails-and-messages/src/pages/api/manifest.ts +++ b/apps/emails-and-messages/src/pages/api/manifest.ts @@ -32,6 +32,8 @@ export default createManifestHandler({ * https://docs.saleor.io/docs/3.x/developer/extending/apps/extending-dashboard-with-apps */ ], + homepageUrl: "https://github.com/saleor/apps", + supportUrl: "https://github.com/saleor/apps/discussions", }; return manifest;