Skip to content

Commit

Permalink
replace tags in project with component
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerhoward15 committed Oct 6, 2023
1 parent c162897 commit c33288e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions components/project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useRef } from "react";
import { projectsData } from "@/lib/data";
import Image from "next/image";
import { motion, useScroll, useTransform } from "framer-motion";
import Tags from "./tags";

type ProjectProps = (typeof projectsData)[number];

Expand Down Expand Up @@ -38,16 +39,7 @@ export default function Project({
<p className="mt-2 leading-relaxed text-gray-700 dark:text-white/70">
{description}
</p>
<ul className="flex flex-wrap mt-4 gap-2 sm:mt-auto">
{tags.map((tag, index) => (
<li
className="bg-black/[0.7] px-3 py-1 text-[0.7rem] uppercase tracking-wider text-white rounded-full dark:text-white/70"
key={index}
>
{tag}
</li>
))}
</ul>
<Tags tags={tags} />
</div>

<Image
Expand Down
2 changes: 1 addition & 1 deletion components/tags.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

export default function Tags({ tags }: { tags: readonly string[]}) {
export default function Tags({ tags }: { tags: readonly string[] }) {
return (
<ul className="flex flex-wrap mt-4 gap-2 sm:mt-6">
{tags?.map((tag, index) => (
Expand Down

0 comments on commit c33288e

Please sign in to comment.