mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-12-12 20:46:52 +01:00
feat: components structure Curriculum Vitae
This commit is contained in:
21
packages/ui/src/Home/About/AboutList/BirthDate.tsx
Normal file
21
packages/ui/src/Home/About/AboutList/BirthDate.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
"use client"
|
||||
|
||||
import { BIRTH_DATE, BIRTH_DATE_STRING } from "@repo/utils/constants"
|
||||
import { getAge } from "@repo/utils/dates"
|
||||
import { useTranslations } from "next-intl"
|
||||
import { useMemo } from "react"
|
||||
|
||||
export interface BirthDateProps {}
|
||||
|
||||
export const BirthDate: React.FC<BirthDateProps> = () => {
|
||||
const t = useTranslations()
|
||||
|
||||
const age = useMemo(() => {
|
||||
return getAge(BIRTH_DATE)
|
||||
}, [])
|
||||
|
||||
return t("home.about.birth-date.value", {
|
||||
age,
|
||||
birthDate: BIRTH_DATE_STRING,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user