initial commit. gotta go

This commit is contained in:
2025-09-26 14:30:57 -05:00
parent b342335502
commit eb0b35bb7f
299 changed files with 6902 additions and 6741 deletions

View File

@@ -1,4 +1,4 @@
"use client";
'use client';
import {
Table,
@@ -7,22 +7,22 @@ import {
TableHead,
TableBody,
TableCell,
} from "@usesend/ui/src/table";
import { api } from "~/trpc/react";
import { useUrlState } from "~/hooks/useUrlState";
import { Button } from "@usesend/ui/src/button";
import Spinner from "@usesend/ui/src/spinner";
import { formatDistanceToNow } from "date-fns";
} from '@usesend/ui/src/table';
import { api } from '~/trpc/react';
import { useUrlState } from '~/hooks/useUrlState';
import { Button } from '@usesend/ui/src/button';
import Spinner from '@usesend/ui/src/spinner';
import { formatDistanceToNow } from 'date-fns';
// import DeleteCampaign from "./delete-campaign";
import Link from "next/link";
import Link from 'next/link';
// import DuplicateCampaign from "./duplicate-campaign";
import { TextWithCopyButton } from "@usesend/ui/src/text-with-copy";
import DeleteTemplate from "./delete-template";
import DuplicateTemplate from "./duplicate-template";
import { TextWithCopyButton } from '@usesend/ui/src/text-with-copy';
import DeleteTemplate from './delete-template';
import DuplicateTemplate from './duplicate-template';
export default function TemplateList() {
const [page, setPage] = useUrlState("page", "1");
const [page, setPage] = useUrlState('page', '1');
const pageNumber = Number(page);
@@ -32,10 +32,10 @@ export default function TemplateList() {
return (
<div className="mt-10 flex flex-col gap-4">
<div className="flex flex-col rounded-xl border border-border shadow">
<div className="border-border flex flex-col rounded-xl border shadow">
<Table className="">
<TableHeader className="">
<TableRow className=" bg-muted/30">
<TableRow className="bg-muted/30">
<TableHead className="rounded-tl-xl">Name</TableHead>
<TableHead className="">ID</TableHead>
<TableHead className="">Created At</TableHead>
@@ -45,9 +45,9 @@ export default function TemplateList() {
<TableBody>
{templateQuery.isLoading ? (
<TableRow className="h-32">
<TableCell colSpan={4} className="text-center py-4">
<TableCell colSpan={4} className="py-4 text-center">
<Spinner
className="w-6 h-6 mx-auto"
className="mx-auto h-6 w-6"
innerSvgClass="stroke-primary"
/>
</TableCell>
@@ -57,7 +57,7 @@ export default function TemplateList() {
<TableRow key={template.id} className="">
<TableCell className="font-medium">
<Link
className="underline underline-offset-4 decoration-dashed text-foreground hover:text-foreground"
className="text-foreground hover:text-foreground underline decoration-dashed underline-offset-4"
href={`/templates/${template.id}/edit`}
>
{template.name}
@@ -84,7 +84,7 @@ export default function TemplateList() {
))
) : (
<TableRow className="h-32">
<TableCell colSpan={4} className="text-center py-4">
<TableCell colSpan={4} className="py-4 text-center">
No templates found
</TableCell>
</TableRow>
@@ -92,7 +92,7 @@ export default function TemplateList() {
</TableBody>
</Table>
</div>
<div className="flex gap-4 justify-end">
<div className="flex justify-end gap-4">
<Button
size="sm"
onClick={() => setPage((pageNumber - 1).toString())}