mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-19 12:15:27 -04:00
minor style tweaks
This commit is contained in:
@@ -5,11 +5,12 @@ import TimeAgo from "react-timeago";
|
||||
import Time from "@/components/time";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
export type RelativeTimeProps = ComponentPropsWithoutRef<"time"> & {
|
||||
const RelativeTime = ({
|
||||
date,
|
||||
...rest
|
||||
}: ComponentPropsWithoutRef<"time"> & {
|
||||
date: string;
|
||||
};
|
||||
|
||||
const RelativeTime = ({ date, ...rest }: RelativeTimeProps) => {
|
||||
}) => {
|
||||
// play nice with SSR -- only use relative time on the client, since it'll quickly become outdated on the server and
|
||||
// cause a react hydration mismatch error.
|
||||
const isMounted = useMountedState();
|
||||
|
||||
Reference in New Issue
Block a user