diff --git a/src/app/_content/Bio.tsx b/src/app/_content/Bio.tsx
deleted file mode 100644
index 360733a..0000000
--- a/src/app/_content/Bio.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-"use client"
-
-import MainAvatar from "@/components/global/MainAvatar"
-import NameHeader from "@/components/global/NameHeader"
-import { useApi } from "@/components/providers/DataProvider"
-
-export default function Bio() {
- const { data } = useApi()
- // const {} = data.profile
- console.log({ data })
- return (
-
- )
-}
diff --git a/src/app/_content/Experience.tsx b/src/app/_content/Experience.tsx
index d46e25a..5880341 100644
--- a/src/app/_content/Experience.tsx
+++ b/src/app/_content/Experience.tsx
@@ -1,5 +1,11 @@
"use client"
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleItem,
+ CollapsibleTrigger,
+} from "@/components/global/Collapsible"
import DateSpan from "@/components/global/DateSpan"
import RuleHeader from "@/components/global/RuleHeader"
import { useApi } from "@/components/providers/DataProvider"
@@ -10,14 +16,17 @@ import {
AccordionTrigger,
} from "@/components/ui/accordion"
import { Badge } from "@/components/ui/badge"
+import { Button } from "@/components/ui/button"
import convertNewLinesToHTML from "@/lib/convertNewLinesToHTML"
import toKebabCase from "@/lib/toKebabCase"
import { Experience as ExperienceType, Role } from "@/lib/types"
import { cn } from "@/lib/utils"
+import { useState } from "react"
export default function Experience() {
const { data } = useApi()
const experience: ExperienceType[] = data.experience.attributes.experience
+ const [viewAllToggle, setViewAllToggle] = useState(false)
const renderSkill = (skill: string, key: number) =>
!!skill ? (
@@ -113,10 +122,36 @@ export default function Experience() {
const renderExperiences = (
-
+
{experience
.filter((item) => item?.disabled !== true)
+ .slice(0, 3)
.map(renderExperience)}
+ {experience.length > 3 && (
+ setViewAllToggle(!!value)}
+ >
+
+
+
+ {experience
+ .filter((item) => item?.disabled !== true)
+ .slice(3)
+ .map(renderExperience)}
+
+
+
+
+
+ {viewAllToggle ? "View Less" : "View All"} Experience
+
+
+
+
+
+ )}
)
@@ -137,7 +172,11 @@ export default function Experience() {
- {renderExperiences}
+
)
}
diff --git a/src/components/global/Collapsible.tsx b/src/components/global/Collapsible.tsx
new file mode 100644
index 0000000..0b4d6e8
--- /dev/null
+++ b/src/components/global/Collapsible.tsx
@@ -0,0 +1,50 @@
+"use client"
+
+import { cn } from "@/lib/utils"
+import * as AccordionPrimitive from "@radix-ui/react-accordion"
+import * as React from "react"
+
+const Collapsible = AccordionPrimitive.Root
+
+const CollapsibleItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+CollapsibleItem.displayName = "CollapsibleItem"
+
+const CollapsibleTrigger = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, children, ...props }, ref) => (
+
+
+ {children}
+
+
+))
+CollapsibleTrigger.displayName = AccordionPrimitive.Trigger.displayName
+
+const CollapsibleContent = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, children, ...props }, ref) => (
+
+ {children}
+
+))
+CollapsibleContent.displayName = AccordionPrimitive.Content.displayName
+
+export { Collapsible, CollapsibleItem, CollapsibleTrigger, CollapsibleContent }
diff --git a/src/components/global/NameHeader.tsx b/src/components/global/NameHeader.tsx
deleted file mode 100644
index 013f984..0000000
--- a/src/components/global/NameHeader.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { useApi } from "@/components/providers/DataProvider"
-
-const NameHeader = () => {
- const { data } = useApi()
- const { name, title } = data.profile.attributes
-
- return (
-
-
{name}
- {title}
-
- )
-}
-export default NameHeader
diff --git a/src/components/global/RuleHeader.tsx b/src/components/global/RuleHeader.tsx
index 9a2146b..6d0ac16 100644
--- a/src/components/global/RuleHeader.tsx
+++ b/src/components/global/RuleHeader.tsx
@@ -12,11 +12,11 @@ export default function RuleHeader(
return (
{["left", "both"].includes(side) && (
-
+
)}
{props.children}
{["right", "both"].includes(side) && (
-
+
)}
)
diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx
index 8dcf9b6..a845a25 100644
--- a/src/components/ui/accordion.tsx
+++ b/src/components/ui/accordion.tsx
@@ -1,10 +1,9 @@
"use client"
-import * as React from "react"
+import { cn } from "@/lib/utils"
import * as AccordionPrimitive from "@radix-ui/react-accordion"
import { ChevronDownIcon } from "@radix-ui/react-icons"
-
-import { cn } from "@/lib/utils"
+import * as React from "react"
const Accordion = AccordionPrimitive.Root
@@ -28,8 +27,8 @@ const AccordionTrigger = React.forwardRef<
svg]:rotate-180",
- className
+ "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all [&[data-state=open]>svg]:rotate-180",
+ className,
)}
{...props}
>