Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix X Icon #49

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
Expand All @@ -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
Expand Down
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' },
Expand All @@ -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' },
Expand Down
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 (
Expand All @@ -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(
Expand Down