Skip to content

Commit d8271f1

Browse files
gadingnstImgBotApp
authored andcommitted
refactor: remove twitter references and update social links
update all references to twitter across the codebase since it's no longer used replace twitter links with instagram in rss feed and share components
1 parent 5aaddda commit d8271f1

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

src/configs/author.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export const AUTHOR_EMAIL = '[email protected]';
44

55
/** social media */
66
export const AUTHOR_FACEBOOK = 'gadingnstn';
7-
export const AUTHOR_TWITTER = 'gadingnstn';
87
export const AUTHOR_INSTAGRAM = 'gadingnst';
98
export const AUTHOR_GITHUB = 'gadingnst';
109
export const AUTHOR_LINKEDIN = 'gadingnst';

src/modules/Content/components/Share.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { FunctionComponent, SVGProps, useCallback, useMemo } from 'react';
44

5-
import { AUTHOR_TWITTER } from '@/configs/author';
65
import { BASE_URL } from '@/configs/sites';
76
import IconFacebook from '@/designs/icons/logo/facebook.svg';
87
import IconLinkedin from '@/designs/icons/logo/linkedin.svg';
@@ -84,7 +83,7 @@ function ContentShare(props: Props) {
8483
return {
8584
'facebook': `https://www.facebook.com/sharer/sharer.php?u=${url}&quote=%22${encodedDesc}%22%0A%0A${tags}`,
8685
'linkedin': `https://www.linkedin.com/sharing/share-offsite/?url=${url}`,
87-
'twitter': `https://twitter.com/intent/tweet?text=%22${encodedDesc}%22%20${url}%20via%20%40${AUTHOR_TWITTER}%0A%0A${hastags}`,
86+
'twitter': `https://twitter.com/intent/tweet?text=%22${encodedDesc}%22%20${url}%20%0A%0A${hastags}`,
8887
'tumblr': `https://www.tumblr.com/widgets/share/tool/preview?posttype=link&canonicalUrl=${url}&title=${encodedTitle}&caption=${encodedDesc}`,
8988
'whatsapp': `https://api.whatsapp.com/send?text=%22${encodedDesc}%22%0A%0A${url}`,
9089
'telegram': `https://telegram.me/share/url?url=${url}&text=%0A%22${encodedDesc}%22`

src/modules/Content/services/rss-feed.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Feed } from 'feed';
22
import Fs from 'fs/promises';
33
import { marked } from 'marked';
44

5-
import { AUTHOR_EMAIL, AUTHOR_FULLNAME, AUTHOR_NAME, AUTHOR_TWITTER } from '@/configs/author';
5+
import { AUTHOR_EMAIL, AUTHOR_FULLNAME, AUTHOR_INSTAGRAM, AUTHOR_NAME } from '@/configs/author';
66
import { BASE_URL, SITE_NAME } from '@/configs/sites';
77
import { getAllBlogMeta, getContent } from '@/modules/Content/services/content-parser';
88
import dt from '@/packages/libs/DayJS/dt';
@@ -23,7 +23,7 @@ async function generateRSSFeed(): Promise<void> {
2323
const author = {
2424
name: AUTHOR_FULLNAME,
2525
email: AUTHOR_EMAIL,
26-
link: `https://x.com/${AUTHOR_TWITTER}`
26+
link: `http://threads.com/@${AUTHOR_INSTAGRAM}`
2727
};
2828

2929
const feed = new Feed({

src/packages/components/layouts/Footer/SocialLinks.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ import {
22
AUTHOR_FACEBOOK,
33
AUTHOR_GITHUB,
44
AUTHOR_INSTAGRAM,
5-
AUTHOR_LINKEDIN,
6-
AUTHOR_TWITTER
5+
AUTHOR_LINKEDIN
76
} from '@/configs/author';
87
import IconFacebook from '@/designs/icons/logo/facebook.svg';
98
import IconGithub from '@/designs/icons/logo/github.svg';
109
import IconInstagram from '@/designs/icons/logo/instagram.svg';
1110
import IconLinkedin from '@/designs/icons/logo/linkedin.svg';
12-
import IconTwitter from '@/designs/icons/logo/twitter.svg';
1311
import cn from '@/designs/utils/cn';
1412
import Link from '@/packages/components/base/Navigations/Link';
1513
import { dasherize } from '@/packages/utils/helpers/string';
@@ -21,12 +19,6 @@ const socialLinks = [
2119
icon: IconGithub,
2220
className: 'bg-[#333] shadow-gray-600'
2321
},
24-
{
25-
name: 'Twitter',
26-
href: `https://twitter.com/${AUTHOR_TWITTER}`,
27-
icon: IconTwitter,
28-
className: 'bg-[#1DA1F2] shadow-blue-400'
29-
},
3022
{
3123
name: 'Instagram',
3224
href: `https://instagram.com/${AUTHOR_INSTAGRAM}`,

src/packages/utils/metadata/metadata.builder.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Metadata } from 'next';
22

3-
import { AUTHOR_NAME, AUTHOR_TWITTER } from '@/configs/author';
3+
import { AUTHOR_NAME } from '@/configs/author';
44
import { BASE_URL, GOOGLE_VERIFICATION_ID, SITE_NAME } from '@/configs/sites';
55
import cloudinary from '@/packages/libs/Cloudinary/utils';
66
import dt from '@/packages/libs/DayJS/dt';
@@ -72,8 +72,6 @@ export function metadataBuilder({ meta, locale = 'en' }: IMetaBuilder) {
7272
card: 'summary_large_image',
7373
title: `${title} | ${SITE_NAME}`,
7474
description: description,
75-
creator: `@${AUTHOR_TWITTER}`,
76-
site: `@${AUTHOR_TWITTER}`,
7775
images: [featuredImage]
7876
},
7977
alternates: {

0 commit comments

Comments
 (0)