From d2c3e348a1044fca7319332b9993215dc2ed51ff Mon Sep 17 00:00:00 2001 From: Kilu Date: Thu, 29 Aug 2024 17:03:08 +0800 Subject: [PATCH] fix: some issue --- .../src/components/as-template/AsTemplate.tsx | 14 +------------- .../as-template/related-template/TemplateItem.tsx | 8 ++------ .../database/components/calendar/event/Event.tsx | 6 +++--- .../publish/header/PublishViewHeader.tsx | 4 ++-- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/frontend/appflowy_web_app/src/components/as-template/AsTemplate.tsx b/frontend/appflowy_web_app/src/components/as-template/AsTemplate.tsx index 16106d24e2..32cd5664e3 100644 --- a/frontend/appflowy_web_app/src/components/as-template/AsTemplate.tsx +++ b/frontend/appflowy_web_app/src/components/as-template/AsTemplate.tsx @@ -59,17 +59,6 @@ function AsTemplate ({ await loadTemplate(); } - notify.info({ - type: 'success', - title: t('template.uploadSuccess'), - message: t('template.uploadSuccessDescription'), - okText: t('template.viewTemplate'), - onOk: () => { - const url = import.meta.env.AF_BASE_URL?.includes('test') ? 'https://test.appflowy.io' : 'https://appflowy.io'; - - window.open(`${url}/templates/${selectedCategoryIds[0]}/${viewId}`, '_blank'); - }, - }); handleBack(); } catch (error) { // eslint-disable-next-line @@ -77,8 +66,7 @@ function AsTemplate ({ notify.error(error.toString()); } - }, [service, selectedCreatorId, selectedCategoryIds, viewId, isNewTemplate, isFeatured, viewUrl, template, t, handleBack, loadTemplate]); - + }, [service, selectedCreatorId, selectedCategoryIds, isNewTemplate, isFeatured, viewId, viewUrl, template, loadTemplate, handleBack]); const submitRef = React.useRef(null); useEffect(() => { diff --git a/frontend/appflowy_web_app/src/components/as-template/related-template/TemplateItem.tsx b/frontend/appflowy_web_app/src/components/as-template/related-template/TemplateItem.tsx index fb77e40c16..4d59ac77a2 100644 --- a/frontend/appflowy_web_app/src/components/as-template/related-template/TemplateItem.tsx +++ b/frontend/appflowy_web_app/src/components/as-template/related-template/TemplateItem.tsx @@ -2,8 +2,6 @@ import { TemplateSummary, TemplateCategory } from '@/application/template.type'; import CreatorAvatar from '@/components/as-template/creator/CreatorAvatar'; import React, { useMemo } from 'react'; -const url = import.meta.env.AF_BASE_URL?.includes('test') ? 'https://test.appflowy.io' : 'https://appflowy.io'; - function TemplateItem ({ template, category }: { template: TemplateSummary; category: TemplateCategory }) { const iframeUrl = useMemo(() => { const url = new URL(template.view_url); @@ -17,16 +15,14 @@ function TemplateItem ({ template, category }: { template: TemplateSummary; cate return ( <> -