initial commit. gotta go
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
'use client';
|
||||
|
||||
import {
|
||||
Table,
|
||||
@@ -7,22 +7,22 @@ import {
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@usesend/ui/src/table";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
import { api } from "~/trpc/react";
|
||||
import Spinner from "@usesend/ui/src/spinner";
|
||||
import EditSesConfiguration from "./edit-ses-configuration";
|
||||
import { TextWithCopyButton } from "@usesend/ui/src/text-with-copy";
|
||||
} from '@usesend/ui/src/table';
|
||||
import { formatDistanceToNow } from 'date-fns';
|
||||
import { api } from '~/trpc/react';
|
||||
import Spinner from '@usesend/ui/src/spinner';
|
||||
import EditSesConfiguration from './edit-ses-configuration';
|
||||
import { TextWithCopyButton } from '@usesend/ui/src/text-with-copy';
|
||||
|
||||
export default function SesConfigurations() {
|
||||
const sesSettingsQuery = api.admin.getSesSettings.useQuery();
|
||||
|
||||
return (
|
||||
<div className="">
|
||||
<div className="border rounded-xl shadow">
|
||||
<div className="rounded-xl border shadow">
|
||||
<Table className="">
|
||||
<TableHeader className="">
|
||||
<TableRow className=" bg-muted/30">
|
||||
<TableRow className="bg-muted/30">
|
||||
<TableHead className="rounded-tl-xl">Region</TableHead>
|
||||
<TableHead>Prefix Key</TableHead>
|
||||
<TableHead>Callback URL</TableHead>
|
||||
@@ -36,16 +36,16 @@ export default function SesConfigurations() {
|
||||
<TableBody>
|
||||
{sesSettingsQuery.isLoading ? (
|
||||
<TableRow className="h-32">
|
||||
<TableCell colSpan={6} className="text-center py-4">
|
||||
<TableCell colSpan={6} className="py-4 text-center">
|
||||
<Spinner
|
||||
className="w-6 h-6 mx-auto"
|
||||
className="mx-auto h-6 w-6"
|
||||
innerSvgClass="stroke-primary"
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : sesSettingsQuery.data?.length === 0 ? (
|
||||
<TableRow className="h-32">
|
||||
<TableCell colSpan={6} className="text-center py-4">
|
||||
<TableCell colSpan={6} className="py-4 text-center">
|
||||
<p>No SES configurations added</p>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
@@ -63,7 +63,7 @@ export default function SesConfigurations() {
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{sesSetting.callbackSuccess ? "Success" : "Failed"}
|
||||
{sesSetting.callbackSuccess ? 'Success' : 'Failed'}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{formatDistanceToNow(sesSetting.createdAt)} ago
|
||||
|
Reference in New Issue
Block a user