Skip to content

Commit

Permalink
minor amendments to timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-the-programmer committed Nov 17, 2024
1 parent 815d5d9 commit 531cbb3
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions src/components/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import React from "react";

const timelineData = [
{
type: "project",
name: "Dog2 🐶",
startDate: "Sep 2024",
},
{
type: "employment",
company: "Starshipit",
logo: "timeline/starshipit.jpeg",
startDate: "Jan 2024 - Present",
startDate: "Jan 2024",
endDate: "Present",
},
{
Expand All @@ -22,8 +27,8 @@ const timelineData = [
type: "employment",
company: "Lightspeed",
logo: "timeline/lightspeed.jpeg",
startDate: "Oct 2022 - Jan 2024",
endDate: "Present",
startDate: "Oct 2022",
endDate: "Jan 2024",
},
{
type: "project",
Expand Down Expand Up @@ -76,12 +81,7 @@ const timelineData = [
},
{
type: "project",
name: "Started scott-the-programmer.com",
startDate: "Feb 2022",
},
{
type: "project",
name: "Created droid-up (mobile backup utility)",
name: "Started scott.murray.kiwi",
startDate: "Feb 2022",
},
{
Expand Down Expand Up @@ -119,22 +119,6 @@ const timelineData = [
},
];

function renderName(name?: string) {
if (name === undefined) {
return <></>;
}
const emojiRegex = /(\p{Emoji_Presentation})/u;
return name
.split(emojiRegex)
.map((part, index) =>
emojiRegex.test(part) ? (
<span key={index}>{part}</span>
) : (
<p key={index}>{part}</p>
),
);
}

const Timeline: React.FC = () => {
return (
<div className="flex flex-col items-center w-full">
Expand Down Expand Up @@ -168,7 +152,7 @@ const Timeline: React.FC = () => {
: "left-1/2 text-left pl-4"
}`}
>
{renderName(item.name)}
{item.name}
</div>
</div>
)}
Expand Down

0 comments on commit 531cbb3

Please sign in to comment.