mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-25 18:55:19 +02:00
housekeeping
This commit is contained in:
parent
5802964932
commit
ef3b49e94f
5 changed files with 28 additions and 866 deletions
|
|
@ -1,57 +0,0 @@
|
|||
'use client';
|
||||
import { Project } from "@/app/lib/types/project_types";
|
||||
import { default as NextLink } from "next/link";
|
||||
import { z } from "zod";
|
||||
import clsx from 'clsx';
|
||||
import { ChevronRightIcon } from "@heroicons/react/24/outline";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
import { tokens } from "@/app/styles/design-tokens";
|
||||
|
||||
interface ProjectCardProps {
|
||||
project: z.infer<typeof Project>;
|
||||
}
|
||||
|
||||
export function ProjectCard({ project }: ProjectCardProps) {
|
||||
return (
|
||||
<NextLink
|
||||
href={`/projects/${project._id}`}
|
||||
className={clsx(
|
||||
"block px-4 py-3",
|
||||
tokens.transitions.default,
|
||||
tokens.colors.light.surfaceHover,
|
||||
tokens.colors.dark.surfaceHover,
|
||||
"group"
|
||||
)}
|
||||
>
|
||||
<div className="flex justify-between items-start">
|
||||
<div className="space-y-1">
|
||||
<h3 className={clsx(
|
||||
tokens.typography.sizes.base,
|
||||
tokens.typography.weights.medium,
|
||||
tokens.colors.light.text.primary,
|
||||
tokens.colors.dark.text.primary,
|
||||
"group-hover:text-indigo-600 dark:group-hover:text-indigo-400",
|
||||
tokens.transitions.default
|
||||
)}>
|
||||
{project.name}
|
||||
</h3>
|
||||
<p className={clsx(
|
||||
tokens.typography.sizes.xs,
|
||||
tokens.colors.light.text.muted,
|
||||
tokens.colors.dark.text.muted
|
||||
)}>
|
||||
Created {formatDistanceToNow(new Date(project.createdAt))} ago
|
||||
</p>
|
||||
</div>
|
||||
<ChevronRightIcon
|
||||
className={clsx(
|
||||
"w-5 h-5",
|
||||
tokens.colors.light.text.muted,
|
||||
tokens.colors.dark.text.muted,
|
||||
"transform transition-transform group-hover:translate-x-0.5"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</NextLink>
|
||||
);
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ import clsx from 'clsx';
|
|||
import { tokens } from "@/app/styles/design-tokens";
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
|
||||
interface ProjectListProps {
|
||||
projects: z.infer<typeof Project>[];
|
||||
|
|
@ -75,7 +75,7 @@ export function ProjectList({ projects, isLoading, searchQuery }: ProjectListPro
|
|||
tokens.colors.light.text.muted,
|
||||
tokens.colors.dark.text.muted
|
||||
)}>
|
||||
Created {formatDistanceToNow(new Date(project.createdAt))} ago
|
||||
Created <RelativeTime date={new Date(project.createdAt)} />
|
||||
</p>
|
||||
</div>
|
||||
<ChevronRightIcon className={clsx(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue