Skip to content

Commit

Permalink
refactor: cleanup the code
Browse files Browse the repository at this point in the history
  • Loading branch information
rxyhn committed Sep 9, 2024
1 parent 74b6716 commit 509e685
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState } from "react";

interface CollapseTextProps {
interface ExpandButtonProps {
children: React.ReactNode;
}

export default function CollapseText({ children }: CollapseTextProps) {
export default function ExpandButton({ children }: ExpandButtonProps) {
const [expanded, setExpanded] = useState(false);

return (
Expand Down
18 changes: 0 additions & 18 deletions src/components/path.json

This file was deleted.

8 changes: 4 additions & 4 deletions src/components/sections/Experience.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import Section from "../Section.astro";
import { work } from "@cv";
import CollapseText from "../CollapseText";
import ExpandButton from "../ExpandButton";
---

<Section className={Astro.props.className} title="Experience">
Expand Down Expand Up @@ -85,7 +85,7 @@ import CollapseText from "../CollapseText";
</div>
)}
{(responsibilities || achievements) && (
<CollapseText client:load>
<ExpandButton client:load>
{responsibilities && (
<div class="flex flex-col gap-2">
<h4 class="font-medium text-neutral-300">
Expand All @@ -110,14 +110,14 @@ import CollapseText from "../CollapseText";
</ul>
</div>
)}
</CollapseText>
</ExpandButton>
)}
</div>
</div>
</div>
</li>
);
},
}
)
}
</ul>
Expand Down

0 comments on commit 509e685

Please sign in to comment.