Skip to content

Commit

Permalink
Fix X Icon
Browse files Browse the repository at this point in the history
svemat01 committed Sep 29, 2023
1 parent af86680 commit 39ddbd1
Showing 4 changed files with 24 additions and 11 deletions.
7 changes: 2 additions & 5 deletions blog/src/components/DynLink.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Image from 'next/image';
import Link from 'next/link';
import { FC } from 'react';
import { FiExternalLink, FiMail, FiYoutube } from 'react-icons/fi';

import xLogo from '../../public/icons/x.svg';
import { XIcon } from './XIcon';

export const DynLink: FC<{ href: string }> = ({ href, ...properties }) => {
const isExternal = href.startsWith('http');
@@ -23,9 +22,7 @@ export const DynLink: FC<{ href: string }> = ({ href, ...properties }) => {
<span className="text-ens-blue not-prose m-0 gap-1 p-0 hover:underline">
<span className="inline-flex pr-0.5 text-xs">
{isYoutube && <FiYoutube />}
{isTwitter && (
<Image src={xLogo} alt="X" className="block h-3 w-3" />
)}
{isTwitter && <XIcon className="block h-3 w-3" />}
{isEmail && <FiMail />}
</span>
<Link
18 changes: 18 additions & 0 deletions blog/src/components/XIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC } from 'react';

export const XIcon: FC<{ className?: string }> = ({ className }) => {
return (
<svg
viewBox="0 0 1200 1227"
xmlns="http://www.w3.org/2000/svg"
className={className}
width={'1em'}
height={'1em'}
>
<path
d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"
fill="currentColor"
/>
</svg>
);
};
5 changes: 2 additions & 3 deletions blog/src/components/navbar/HamburgerMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import Image from 'next/image';
import Link from 'next/link';
import { FC } from 'react';
import { FaDiscord, FaYoutube } from 'react-icons/fa';
import { FiGithub, FiMessageCircle } from 'react-icons/fi';

import xLogo from '../../../public/icons/x.svg';
import { CrossSVG, MenuSVG } from '../ClientIcons';
import { XIcon } from '../XIcon';

const links = [
{ name: 'ENS Manager', to: 'https://app.ens.domains' },
@@ -16,7 +15,7 @@ const links = [

const socials = [
{
icon: <Image src={xLogo} className="w-5" alt="text-neutral-400" />,
icon: <XIcon className="w-5 text-neutral-400" />,
to: 'https://twitter.com/ensdomains',
},
{ icon: <FiGithub />, to: 'https://github.com/ensdomains' },
5 changes: 2 additions & 3 deletions blog/src/components/post/PostFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* eslint-disable sonarjs/no-duplicate-string */
import clsx from 'clsx';
import Image from 'next/image';
import { FaFacebookF, FaLinkedin } from 'react-icons/fa';

import { BlogPostMetadata } from '@/types/BlogPostMetadata';

import xLogo from '../../../public/icons/x.svg';
import { Author } from '../Author';
import { BigTag } from '../tags/BigTag';
import { XIcon } from '../XIcon';

export const PostFooter = ({ post }: { post: BlogPostMetadata }) => {
return (
@@ -29,7 +28,7 @@ export const PostFooter = ({ post }: { post: BlogPostMetadata }) => {
rel="noopener noreferrer"
className="flex w-5 items-center"
>
<Image src={xLogo} alt="X logo" />
<XIcon />
</a>
<a
href={`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(

0 comments on commit 39ddbd1

Please sign in to comment.