refactor: move DataDisplay

This commit is contained in:
SevicheCC 2023-06-06 02:54:20 +08:00
parent c2900df6e9
commit 81dbaa3151
Signed by: SevicheCC
GPG key ID: C577000000000000
2 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
"use client"; "use client";
import InputForm from "@/components/InputForm"; import InputForm from "@/components/InputForm";
import DataDisplay from "@/components/DataDisplay"; import DataDisplay from "@/components/ResultTable";
import useCreateApp from "@/hooks/useCreateApp"; import useCreateApp from "@/hooks/useCreateApp";
const FormContainer = () => { const FormContainer = () => {

View file

@ -13,11 +13,11 @@ import { AppEntry } from "@/lib/types";
import { CopyButton } from "./ui/copybutton"; import { CopyButton } from "./ui/copybutton";
const renderTableRow = (label: string, value: string | undefined) => ( const renderTableRow = (label: string, value: string | undefined) => (
<TableRow className="group relative"> <TableRow className="relative">
<TableCell className="font-medium">{label}</TableCell> <TableCell className="font-medium">{label}</TableCell>
<TableCell className="font-mono break-all flex justify-between items-center"> <TableCell className="flex items-center justify-between break-all font-mono">
{value} {value}
{value && <CopyButton value={value} className="end-2 shrink-0"/>} {value && <CopyButton value={value} className="end-2 shrink-0" />}
</TableCell> </TableCell>
</TableRow> </TableRow>
); );