@@ -30,7 +30,7 @@ import { mapUsers } from '../../design/lib/mappers/users'
3030import {
3131 mdiCog ,
3232 mdiDownload ,
33- mdiGiftOutline ,
33+ mdiExclamationThick ,
3434 mdiInbox ,
3535 mdiLogoutVariant ,
3636 mdiMagnify ,
@@ -49,8 +49,6 @@ import {
4949import { useModal } from '../../design/lib/stores/modal'
5050import NewDocButton from './buttons/NewDocButton'
5151import { useCloudSidebarTree } from '../lib/hooks/sidebar/useCloudSidebarTree'
52- import { isTimeEligibleForDiscount } from '../lib/subscription'
53- import DiscountModal from './Modal/contents/DiscountModal'
5452import { Notification as UserNotification } from '../interfaces/db/notifications'
5553import useNotificationState from '../../design/lib/hooks/useNotificationState'
5654import { useNotifications } from '../../design/lib/stores/notifications'
@@ -64,7 +62,6 @@ import SidebarHeader from '../../design/components/organisms/Sidebar/atoms/Sideb
6462import SidebarButtonList from '../../design/components/organisms/Sidebar/molecules/SidebarButtonList'
6563import { getTeamLinkHref } from './Link/TeamLink'
6664import WithPastille from '../../design/components/atoms/WithPastille'
67- import SidebarButton from '../../design/components/organisms/Sidebar/atoms/SidebarButton'
6865import CloudGlobalSearch from './CloudGlobalSearch'
6966import { useCloudSidebarSpaces } from '../lib/hooks/sidebar/useCloudSidebarSpaces'
7067import { trackEvent } from '../api/track'
@@ -78,6 +75,7 @@ import SidebarSubscriptionCTA from './Subscription/SidebarSubscriptionCTA'
7875import { isEmpty } from 'lodash'
7976import LoaderTopbar from '../../design/components/atoms/loaders/LoaderTopbar'
8077import Icon from '../../design/components/atoms/Icon'
78+ import ExportModal from './Modal/contents/ExportModal'
8179
8280interface ApplicationProps {
8381 className ?: string
@@ -101,7 +99,6 @@ const Application = ({
10199 permissions = [ ] ,
102100 currentUserPermissions,
103101 currentUserIsCoreMember,
104- subscription,
105102 navigatingBetweenPage,
106103 } = usePage ( )
107104 const { openModal } = useModal ( )
@@ -406,6 +403,23 @@ const Application = ({
406403 } ,
407404 id : 'sidebar__button__members' ,
408405 } ,
406+ {
407+ label : 'Export your data' ,
408+ icon : (
409+ < WithPastille >
410+ < Icon size = { 16 } path = { mdiExclamationThick } />
411+ </ WithPastille >
412+ ) ,
413+ variant : 'transparent' ,
414+ labelClick : ( ) => {
415+ return openModal ( < ExportModal /> , {
416+ showCloseIcon : true ,
417+ width : 'large' ,
418+ } )
419+ } ,
420+ id : 'sidebar__button__export' ,
421+ pastille : counts [ team . id ] ? counts [ team . id ] : undefined ,
422+ } ,
409423 ] }
410424 >
411425 { currentUserIsCoreMember && < NewDocButton team = { team } /> }
@@ -422,6 +436,7 @@ const Application = ({
422436 team ,
423437 translate ,
424438 showSearchScreen ,
439+ openModal ,
425440 ] )
426441
427442 const sidebarFooter = useMemo ( ( ) => {
@@ -450,31 +465,11 @@ const Application = ({
450465 id : 'sidebar__button__shared' ,
451466 } ,
452467 ] }
453- >
454- { isTimeEligibleForDiscount ( team ) && subscription == null ? (
455- < SidebarButton
456- variant = 'subtle'
457- icon = {
458- < WithPastille >
459- < Icon size = { 16 } path = { mdiGiftOutline } />
460- </ WithPastille >
461- }
462- id = 'sidebar__button__promo'
463- label = { translate ( lngKeys . SidebarNewUserDiscount ) }
464- labelClick = { ( ) => {
465- trackEvent ( MixpanelActionTrackTypes . DiscountSidebar )
466- return openModal ( < DiscountModal /> , {
467- showCloseIcon : true ,
468- width : 'large' ,
469- } )
470- } }
471- />
472- ) : null }
473- </ SidebarButtonList >
468+ />
474469 < SidebarSubscriptionCTA />
475470 </ >
476471 )
477- } , [ team , translate , pathname , subscription , push , sendToElectron , openModal ] )
472+ } , [ team , translate , pathname , push , sendToElectron ] )
478473
479474 return (
480475 < >
@@ -535,7 +530,6 @@ const Application = ({
535530 </ >
536531 }
537532 />
538-
539533 < AnnouncementAlert />
540534 < div
541535 id = 'application__anchor'
0 commit comments