Skip to content

Commit c840c5b

Browse files
committed
chore: remove social share
1 parent 9a26a3f commit c840c5b

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

src/components/pages/blog/aside/aside.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ type AsideProps = AuthorProps & {
1414
const Aside = ({ tocItems }: AsideProps) => {
1515
return (
1616
<aside className="scrollbar-hidden lg:gap-x-grid sticky top-[144px] col-span-3 ml-auto flex max-h-[calc(100vh-40px)] w-full flex-col overflow-y-auto lg:col-span-full lg:mt-14 lg:grid lg:grid-cols-12 md:mt-10 sm:mt-8 sm:gap-y-4">
17-
{tocItems.length > 0 && (
18-
<TableOfContents items={tocItems} className="overflow-y-auto" showSocialShare />
19-
)}
17+
{tocItems.length > 0 && <TableOfContents items={tocItems} className="overflow-y-auto" />}
2018
<div className="mt-4 flex w-full flex-col items-start justify-start pl-5 lg:hidden">
2119
<Promo />
2220
</div>

src/components/pages/docs/table-of-contents/table-of-contents.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ import clsx from 'clsx';
88
import { TableOfContents as TOCProps } from '@/types/docs';
99

1010
import BackToTopIcon from '@/svgs/back-to-top.inline.svg';
11-
import SocialLinks from '../../blog/aside/social-links';
12-
import { SocialLink } from '../../blog/aside/social-links/social-links';
1311

1412
type TableOfContentsProps = {
1513
items: TOCProps[];
1614
hasBackToTop?: boolean;
17-
showSocialShare?: boolean;
1815
className?: string;
1916
};
2017

@@ -42,26 +39,9 @@ const onClick = (evt: React.MouseEvent<HTMLAnchorElement>, id: string) => {
4239
}
4340
};
4441

45-
const SocialItems = [
46-
{
47-
network: 'twitter',
48-
},
49-
{
50-
network: 'linkedIn',
51-
},
52-
{
53-
network: 'hackerNews',
54-
},
55-
] as SocialLink[];
56-
5742
const CURRENT_ANCHOR_GAP_PX = 16;
5843

59-
const TableOfContents = ({
60-
items,
61-
hasBackToTop,
62-
showSocialShare,
63-
className,
64-
}: TableOfContentsProps) => {
44+
const TableOfContents = ({ items, hasBackToTop, className }: TableOfContentsProps) => {
6545
const containerRef = useRef<HTMLDivElement>(null);
6646
const titles = useRef<HTMLElement[]>([]);
6747
const [currentAnchor, setCurrentAnchor] = useState<string | null>(null);
@@ -151,13 +131,6 @@ const TableOfContents = ({
151131
<span>Back to top</span>
152132
</button>
153133
)}
154-
155-
{showSocialShare && (
156-
<div className="mt-4 flex w-full flex-col items-start justify-start pl-5">
157-
<h3 className="text-14">Share this article</h3>
158-
<SocialLinks items={SocialItems} />
159-
</div>
160-
)}
161134
</nav>
162135
);
163136
};

0 commit comments

Comments
 (0)