Skip to content

Commit 14fd278

Browse files
authored
feat: reopen the publish portal (AppFlowy-IO#13)
1 parent f5941a7 commit 14fd278

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/components/app/share/ShareTabs.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useAppView } from '@/components/app/app.hooks';
2-
// import PublishPanel from '@/components/app/share/PublishPanel';
2+
import PublishPanel from '@/components/app/share/PublishPanel';
33
import TemplatePanel from '@/components/app/share/TemplatePanel';
44
import SharePanel from '@/components/app/share/SharePanel';
55
import { useCurrentUser } from '@/components/main/app.hooks';
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
88
import { ViewTabs, ViewTab, TabPanel } from 'src/components/_shared/tabs/ViewTabs';
99
import { ReactComponent as Templates } from '@/assets/template.svg';
1010

11-
// import { ReactComponent as PublishedWithChanges } from '@/assets/published_with_changes.svg';
11+
import { ReactComponent as PublishedWithChanges } from '@/assets/published_with_changes.svg';
1212

1313
enum TabKey {
1414
SHARE = 'share',
@@ -28,12 +28,13 @@ function ShareTabs ({ opened, viewId, onClose }: { opened: boolean, viewId: stri
2828
label: t('shareAction.shareTab'),
2929
Panel: SharePanel,
3030
},
31-
// {
32-
// value: TabKey.PUBLISH,
33-
// label: t('shareAction.publish'),
34-
// icon: view?.is_published ? <PublishedWithChanges className={'w-4 h-4 text-function-success mb-0'} /> : undefined,
35-
// Panel: PublishPanel,
36-
// },
31+
{
32+
value: TabKey.PUBLISH,
33+
label: t('shareAction.publish'),
34+
icon: view?.is_published ?
35+
<PublishedWithChanges className={'w-4 h-4 text-function-success mb-0'} /> : undefined,
36+
Panel: PublishPanel,
37+
},
3738
currentUser?.email?.endsWith('appflowy.io') && view?.is_published && {
3839
value: TabKey.TEMPLATE,
3940
label: t('template.asTemplate'),

0 commit comments

Comments
 (0)