mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 12:27:43 +00:00
feat: MCP plugin (#2666)
* chore: wip * wip * feat: mcp plugin * wip * chore: fix lock file * clean up * schema * docs * chore: lint * chore: release v1.2.9-beta.1 * blog * chore: lint
This commit is contained in:
25
docs/app/blog/_components/fmt-dates.tsx
Normal file
25
docs/app/blog/_components/fmt-dates.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const dateFormatter = new Intl.DateTimeFormat("en-US", {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
timeZone: "UTC",
|
||||
});
|
||||
|
||||
export function FormattedDate({
|
||||
date,
|
||||
...props
|
||||
}: React.ComponentPropsWithoutRef<"time"> & { date: string | Date }) {
|
||||
date = typeof date === "string" ? new Date(date) : date;
|
||||
|
||||
return (
|
||||
<time
|
||||
className={cn(props.className, "")}
|
||||
dateTime={date.toISOString()}
|
||||
{...props}
|
||||
>
|
||||
{dateFormatter.format(date)}
|
||||
</time>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user