diff --git a/src/components/primitives/Divider.tsx b/src/components/primitives/Divider.tsx index c74c18bd..fd1d4e60 100644 --- a/src/components/primitives/Divider.tsx +++ b/src/components/primitives/Divider.tsx @@ -44,9 +44,7 @@ export type DividerProps = Component< >; export default function Divider({ vertical = false, horizontal = true, look, className, ...props }: DividerProps) { - if (horizontal) return
; + if (horizontal && !vertical) return ; - return ( - - ); + return ; } diff --git a/src/components/primitives/Time.tsx b/src/components/primitives/Time.tsx index 6e9db387..09042898 100644 --- a/src/components/primitives/Time.tsx +++ b/src/components/primitives/Time.tsx @@ -3,21 +3,23 @@ import { useMemo } from "react"; export type TimeProps = { timestamp: number | bigint; + prefix?: string; relative?: "hours" | "day" | "auto"; }; -export default function Time({ timestamp }: TimeProps) { +export default function Time({ timestamp, prefix }: TimeProps) { const time = useMemo(() => { const then = moment(Number(timestamp)).fromNow(); return then + .replace("in ", (prefix && `${prefix} `) ?? "in ") .replace("/ minute| minutes/g", "m") .replace(/\ba\b/, "1") .replace(/ seconds| second/g, "s") - .replace(/ hours| hour/g, "h") - .replace(/ days| day/g, "d") - .replace(/ months| month/g, "d"); - }, [timestamp]); + .replace(/ hours| hour/g, "hours") + .replace(/ days| day/g, " days") + .replace(/ months| month/g, " months"); + }, [timestamp, prefix]); return time; }