Skip to content

Commit

Permalink
Fix inconsistent sanitized types
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedselhady committed Aug 25, 2024
1 parent d958514 commit 9ed9661
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/components/details-card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { Fragment } from 'react';
import {
FaGlobe,
} from 'react-icons/fa';
import { Profile } from '../../interfaces/profile';
import {
SanitizedGithub,
Expand Down Expand Up @@ -30,27 +27,13 @@ const Gmail = () => {
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="60px" height="60px"><path fill="#4caf50" d="M45,16.2l-5,2.75l-5,4.75L35,40h7c1.657,0,3-1.343,3-3V16.2z" /><path fill="#1e88e5" d="M3,16.2l3.614,1.71L13,23.7V40H6c-1.657,0-3-1.343-3-3V16.2z" /><polygon fill="#e53935" points="35,11.2 24,19.45 13,11.2 12,17 13,23.7 24,31.95 35,23.7 36,17" /><path fill="#c62828" d="M3,12.298V16.2l10,7.5V11.2L9.876,8.859C9.132,8.301,8.228,8,7.298,8h0C4.924,8,3,9.924,3,12.298z" /><path fill="#fbc02d" d="M45,12.298V16.2l-10,7.5V11.2l3.124-2.341C38.868,8.301,39.772,8,40.702,8h0 C43.076,8,45,9.924,45,12.298z" /></svg>)
}

const getFormattedMastodonValue = (
mastodonValue: string,
isLink: boolean,
): string => {
const [username, server] = mastodonValue.split('@');

if (isLink) {
return `https://${server}/@${username}`;
} else {
return `${username}@${server}`;
}
};


const ListItem: React.FC<{
icon: React.ReactNode;
title: React.ReactNode;
value: React.ReactNode;
link?: string;
skeleton?: boolean;
}> = ({ icon, title, value, link, skeleton = false }) => {
}> = ({ icon, link }) => {
return (
<div className="flex justify-start py-2 px-1 items-center">
<div className="flex-grow font-large gap-1 flex items-center my-1">
Expand Down

0 comments on commit 9ed9661

Please sign in to comment.