Skip to content

Commit

Permalink
feat: share a page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Bagautdinov committed Jul 16, 2024
1 parent 897ba70 commit 7e18af6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/SubNavigation/SubNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ export interface SubNavigationProps {
miniTocOpened: boolean;
toggleMiniTocOpen: () => void;
closeMiniToc: () => void;
// shareData: ShareData;
}

export const SubNavigation = ({
title,
hideMiniToc,
miniTocOpened,
// shareData
toggleMiniTocOpen,
closeMiniToc,
}: SubNavigationProps) => {
Expand All @@ -37,7 +35,7 @@ export const SubNavigation = ({
const shareData = useMemo(() => {
return {
title,
// url: window.location.href // ?
url: window.location.href
};
}, [title]);

Expand Down Expand Up @@ -108,7 +106,7 @@ export const SubNavigation = ({
.then(() => {})
.catch((error) => console.error('Error sharing', error));
} else {
console.log('Share not supported', shareData); // ?
console.log('Share not supported', shareData);
}
}, [shareData]);

Expand Down

0 comments on commit 7e18af6

Please sign in to comment.