[] }) => {
+ const router = useRouter()
+
+ const currentUrl = `${AppRoutes.blog}${router.asPath}`
+
+ const sharingText = `${title} by @${authors
+ .map((author) => author.fields.name)
+ .join(', @')
+ .toString()}`
+
+ const xUrl = `https://twitter.com/intent/tweet?url=${encodeURIComponent(currentUrl)}&text=${encodeURIComponent(
+ sharingText,
+ )}`
+ const linkedinUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(currentUrl)}`
+
+ return (
+
+ {/* X */}
+
+
+
+
+ {/* Linkedin */}
+
+
+
+
+ )
+}
+
+export default Socials
diff --git a/src/components/Blog/styles.module.css b/src/components/Blog/styles.module.css
index 5ff4f09c8..868e6b1dd 100644
--- a/src/components/Blog/styles.module.css
+++ b/src/components/Blog/styles.module.css
@@ -71,15 +71,25 @@
color: var(--mui-palette-primary-main);
}
-.contentTable ul {
+.sidebar ul {
padding-left: 0px;
list-style: none;
}
-.contentTable li {
+.sidebar li {
margin-bottom: 8px;
}
+.socials {
+ display: flex;
+ gap: 16px;
+}
+
+.socials svg {
+ width: 24px;
+ height: 24px;
+}
+
@media (min-width: 900px) {
.title {
margin-top: 24px;
@@ -93,7 +103,7 @@
flex-direction: row-reverse;
}
- .contentTable {
+ .sidebar {
position: sticky;
top: calc(var(--header-height) + 24px);
}