Add clickable link to reverse share's shares

This commit is contained in:
pierrbt
2023-06-29 20:07:00 +02:00
parent f96ac5e4ba
commit 36fa76563e

View File

@@ -1,6 +1,7 @@
import {
Accordion,
ActionIcon,
Anchor,
Box,
Button,
Center,
@@ -34,6 +35,8 @@ const MyShares = () => {
const [reverseShares, setReverseShares] = useState<MyReverseShare[]>();
const appUrl = config.get("general.appUrl");
const getReverseShares = () => {
shareService
.getMyReverseShares()
@@ -119,9 +122,11 @@ const MyShares = () => {
<Accordion.Panel>
{reverseShare.shares.map((share) => (
<Group key={share.id} mb={4}>
<Text maw={120} truncate>
{share.id}
</Text>
<Anchor href={`${appUrl}/share/${share.id}`}>
<Text maw={120} truncate>
{share.id}
</Text>
</Anchor>
<ActionIcon
color="victoria"
variant="light"
@@ -129,9 +134,7 @@ const MyShares = () => {
onClick={() => {
if (window.isSecureContext) {
clipboard.copy(
`${config.get(
"general.appUrl"
)}/share/${share.id}`
`${appUrl}/share/${share.id}`
);
toast.success(
"The share link was copied to the keyboard."