diff --git a/apps/emails-and-messages/src/components/text-link.tsx b/apps/emails-and-messages/src/components/text-link.tsx deleted file mode 100644 index f24a424..0000000 --- a/apps/emails-and-messages/src/components/text-link.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { actions, useAppBridge } from "@saleor/app-sdk/app-bridge"; -import { TextProps, Text } from "@saleor/macaw-ui/next"; -import Link from "next/link"; - -interface TextLinkProps extends TextProps { - href: string; - openNewTab?: boolean; -} - -export const TextLink = ({ href, openNewTab, children, props }: TextLinkProps) => { - const { appBridge } = useAppBridge(); - - const onClick = (event: React.MouseEvent) => { - event.preventDefault(); - - appBridge?.dispatch( - actions.Redirect({ - to: href, - newContext: true, - }) - ); - }; - - return ( - - {openNewTab ? ( - - {children} - - ) : ( - {children} - )} - - ); -}; diff --git a/apps/emails-and-messages/src/pages/configuration/smtp/[configurationId]/event/[eventType].tsx b/apps/emails-and-messages/src/pages/configuration/smtp/[configurationId]/event/[eventType].tsx index 5212789..754d2bd 100644 --- a/apps/emails-and-messages/src/pages/configuration/smtp/[configurationId]/event/[eventType].tsx +++ b/apps/emails-and-messages/src/pages/configuration/smtp/[configurationId]/event/[eventType].tsx @@ -8,7 +8,7 @@ import { parseMessageEventType } from "../../../../../modules/event-handlers/par import { appUrls } from "../../../../../modules/app-configuration/urls"; import { EventForm } from "../../../../../modules/smtp/ui/event-form"; import { smtpUrls } from "../../../../../modules/smtp/urls"; -import { TextLink } from "../../../../../components/text-link"; +import { TextLink } from "@saleor/apps-ui"; const LoadingView = () => { return ( @@ -84,7 +84,7 @@ const EditSmtpEventPage: NextPage = () => { Edit template for {eventType} event. You can learn more about MJML{" "} - + here .