Skip to content

Commit

Permalink
feat: use the new SharingDialog with cascading sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Aug 24, 2021
1 parent 3ebb380 commit b1e0bc5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/pages/view/TitleBar/ActionsBar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useDataEngine, useAlert } from '@dhis2/app-runtime'
import { useD2 } from '@dhis2/app-runtime-adapter-d2'
import i18n from '@dhis2/d2-i18n'
import SharingDialog from '@dhis2/d2-ui-sharing-dialog'
import { SharingDialog } from '@dhis2-ui/sharing-dialog'
import { Button, FlyoutMenu, MenuItem, colors, IconMore24 } from '@dhis2/ui'
import PropTypes from 'prop-types'
import React, { useState } from 'react'
Expand Down Expand Up @@ -167,14 +167,11 @@ const ViewActions = ({
{getMoreButton(classes.moreButtonSmall, true)}
</div>
</div>
{id && (
{id && sharingDialogIsOpen && (
<SharingDialog
d2={d2}
id={id}
type="dashboard"
onRequestClose={onToggleSharingDialog}
open={sharingDialogIsOpen}
insertTheme={true}
onClose={onToggleSharingDialog}
/>
)}
</>
Expand Down

0 comments on commit b1e0bc5

Please sign in to comment.