Skip to content

Commit cd16390

Browse files
committed
refactor: icons
1 parent 2ea89cb commit cd16390

File tree

4 files changed

+21
-35
lines changed

4 files changed

+21
-35
lines changed

src/components/ShareButtons.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { useState, useEffect } from 'react';
22
import {
3-
FacebookLogo,
4-
TwitterLogo,
5-
LinkedinLogo,
6-
LinkSimple,
7-
WhatsappLogo,
8-
RedditLogo,
3+
FacebookLogoIcon,
4+
TwitterLogoIcon,
5+
LinkedinLogoIcon,
6+
LinkSimpleIcon,
7+
WhatsappLogoIcon,
8+
RedditLogoIcon,
99
} from '@phosphor-icons/react';
1010
import { useToast } from '../hooks/useToast';
1111

@@ -149,7 +149,7 @@ const ShareButtons = ({ title, url }) => {
149149
className="text-gray-400 hover:text-primary-400 transition-colors"
150150
aria-label="Copy link"
151151
>
152-
<LinkSimple size={24} />
152+
<LinkSimpleIcon size={24} />
153153
</button>
154154
) : (
155155
<>
@@ -165,7 +165,7 @@ const ShareButtons = ({ title, url }) => {
165165
className="text-gray-400 hover:text-blue-400 transition-colors"
166166
aria-label="Share on Twitter"
167167
>
168-
<TwitterLogo size={24} />
168+
<TwitterLogoIcon size={24} />
169169
</button>
170170
<button
171171
onClick={() =>
@@ -179,7 +179,7 @@ const ShareButtons = ({ title, url }) => {
179179
className="text-gray-400 hover:text-blue-600 transition-colors"
180180
aria-label="Share on Facebook"
181181
>
182-
<FacebookLogo size={24} />
182+
<FacebookLogoIcon size={24} />
183183
</button>
184184
<button
185185
onClick={() =>
@@ -193,7 +193,7 @@ const ShareButtons = ({ title, url }) => {
193193
className="text-gray-400 hover:text-blue-700 transition-colors"
194194
aria-label="Share on LinkedIn"
195195
>
196-
<LinkedinLogo size={24} />
196+
<LinkedinLogoIcon size={24} />
197197
</button>
198198
<button
199199
onClick={() =>
@@ -207,7 +207,7 @@ const ShareButtons = ({ title, url }) => {
207207
className="text-gray-400 hover:text-green-500 transition-colors"
208208
aria-label="Share on WhatsApp"
209209
>
210-
<WhatsappLogo size={24} />
210+
<WhatsappLogoIcon size={24} />
211211
</button>
212212
<button
213213
onClick={() =>
@@ -221,14 +221,14 @@ const ShareButtons = ({ title, url }) => {
221221
className="text-gray-400 hover:text-orange-500 transition-colors"
222222
aria-label="Share on Reddit"
223223
>
224-
<RedditLogo size={24} />
224+
<RedditLogoIcon size={24} />
225225
</button>
226226
<button
227227
onClick={() => handleShare(null, 'Copy Link')} // Pass null for platformUrl for Copy Link
228228
className="text-gray-400 hover:text-primary-400 transition-colors"
229229
aria-label="Copy link"
230230
>
231-
<LinkSimple size={24} />
231+
<LinkSimpleIcon size={24} />
232232
</button>
233233
</>
234234
)}

src/pages/BlogPostPage.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import { useParams, Link, useNavigate } from 'react-router-dom';
33
import ReactMarkdown from 'react-markdown';
44
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
55
import {
6-
ArrowSquareOut,
7-
ArrowsOutSimple,
8-
Clipboard,
9-
ArrowLeft,
6+
ArrowsOutSimpleIcon,
7+
ClipboardIcon,
108
ArrowLeftIcon,
119
} from '@phosphor-icons/react';
1210
import { customTheme } from '../utils/customTheme';
@@ -195,14 +193,14 @@ const BlogPostPage = () => {
195193
className="text-cyan-300 bg-gray-800/90 border border-cyan-900/50 p-1.5 rounded hover:bg-gray-700 hover:text-cyan-200 transition-colors shadow-lg backdrop-blur-sm"
196194
title="Expand Code"
197195
>
198-
<ArrowsOutSimple size={16} />
196+
<ArrowsOutSimpleIcon size={16} />
199197
</button>
200198
<button
201199
onClick={handleCopy}
202200
className="text-cyan-300 bg-gray-800/90 border border-cyan-900/50 p-1.5 rounded hover:bg-gray-700 hover:text-cyan-200 transition-colors shadow-lg backdrop-blur-sm"
203201
title="Copy Code"
204202
>
205-
<Clipboard size={16} />
203+
<ClipboardIcon size={16} />
206204
</button>
207205
</div>
208206
<div className="rounded-lg overflow-hidden border border-gray-700/50 shadow-2xl">
@@ -382,7 +380,7 @@ const BlogPostPage = () => {
382380
className="group flex flex-col items-start max-w-[45%]"
383381
>
384382
<span className="text-xs text-gray-500 font-mono mb-1 group-hover:text-cyan-400 transition-colors">
385-
<ArrowLeft size={14} className="inline mr-1" /> Previous
383+
<ArrowLeftIcon size={14} className="inline mr-1" /> Previous
386384
Transmission
387385
</span>
388386
<span className="text-gray-300 group-hover:text-white font-semibold line-clamp-2 leading-snug transition-colors">
@@ -402,7 +400,7 @@ const BlogPostPage = () => {
402400
>
403401
<span className="text-xs text-gray-500 font-mono mb-1 group-hover:text-cyan-400 transition-colors">
404402
Next Transmission{' '}
405-
<ArrowLeft size={14} className="inline ml-1 rotate-180" />
403+
<ArrowLeftIcon size={14} className="inline ml-1 rotate-180" />
406404
</span>
407405
<span className="text-gray-300 group-hover:text-white font-semibold line-clamp-2 leading-snug transition-colors">
408406
{nextPost.title}

src/pages/LogDetailPage.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
22
import { useParams, Link } from 'react-router-dom';
33
import ReactMarkdown from 'react-markdown';
44
import LogMetadata from '../components/metadata-cards/LogMetadata';
5-
import { ArrowLeftIcon, ArrowSquareOutIcon } from '@phosphor-icons/react';
5+
import { ArrowLeftIcon } from '@phosphor-icons/react';
66
import ImageModal from '../components/ImageModal';
77

88
import Seo from '../components/Seo';
@@ -18,18 +18,6 @@ const LogDetailPage = () => {
1818
const contentRef = useRef(null);
1919
const [modalImageSrc, setModalImageSrc] = useState(null);
2020

21-
const categories = [
22-
'Book',
23-
'Movie',
24-
'Game',
25-
'Article',
26-
'Music',
27-
'Series',
28-
'Food',
29-
'Websites',
30-
'Tools',
31-
];
32-
3321
useEffect(() => {
3422
const fetchLog = async () => {
3523
setLoading(true);

src/utils/dndWallpapers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const dndWallpapers = [
44
'/images/stories/wallies/ember-navarro-3q2TzsUUVIo-unsplash.jpg',
55
'/images/stories/wallies/galxrax-rax-oGAf4jsC0Fw-unsplash.jpg',
66
'/images/stories/wallies/jr-korpa-RADGP_E2pBk-unsplash.jpg',
7-
'/images/stories/wallies/muhammad-haikal-sjukri--RMBf_xSf2U-unsplash.jpg',
7+
'/images/stories/wallies/muhammad-haikal-sjukri--RMBf_xSf2U-unsplash.jpg'
88
];
99

1010
export default dndWallpapers;

0 commit comments

Comments
 (0)