import { observer } from "mobx-react"; import { LinkIcon } from "outline-icons"; import * as React from "react"; import { useTranslation, Trans } from "react-i18next"; import { Link } from "react-router-dom"; import Empty from "~/components/Empty"; import Heading from "~/components/Heading"; import HelpText from "~/components/HelpText"; import PaginatedList from "~/components/PaginatedList"; import Scene from "~/components/Scene"; import Subheading from "~/components/Subheading"; import useCurrentTeam from "~/hooks/useCurrentTeam"; import useStores from "~/hooks/useStores"; import ShareListItem from "./components/ShareListItem"; function Shares() { const team = useCurrentTeam(); const { t } = useTranslation(); const { shares, auth, policies } = useStores(); const canShareDocuments = auth.team && auth.team.sharing; const can = policies.abilities(team.id); return ( }> {t("Share Links")} Documents that have been shared are listed below. Anyone that has the public link can access a read-only version of the document until the link has been revoked. {can.manage && ( {!canShareDocuments && ( {t("Sharing is currently disabled.")} )}{" "} , }} /> )} {t("Shared documents")} {t("No share links, yet.")}} fetch={shares.fetchPage} renderItem={(item) => } /> ); } export default observer(Shares);