web & sdk: improved sdk (better failover and batching)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-01-12 11:31:46 +01:00
parent 8e7558790e
commit 5b5ad23f66
26 changed files with 1266 additions and 377 deletions

View File

@@ -9,5 +9,9 @@ interface SyntaxProps {
}
export default function Syntax({ code }: SyntaxProps) {
return <SyntaxHighlighter style={docco}>{code}</SyntaxHighlighter>;
return (
<SyntaxHighlighter wrapLongLines style={docco}>
{code}
</SyntaxHighlighter>
);
}

View File

@@ -23,17 +23,26 @@ export const columns: ColumnDef<IClientWithProject>[] = [
accessorKey: 'id',
header: 'Client ID',
},
{
accessorKey: 'cors',
header: 'Cors',
},
{
accessorKey: 'secret',
header: 'Secret',
cell: () => <div className="italic text-muted-foreground">Hidden</div>,
cell: (info) =>
info.getValue() ? (
<div className="italic text-muted-foreground">Hidden</div>
) : (
'None'
),
},
{
accessorKey: 'createdAt',
header: 'Created at',
cell({ row }) {
const date = row.original.createdAt;
return <div>{formatDate(date)}</div>;
return formatDate(date);
},
},
{

View File

@@ -9,9 +9,9 @@ type InputWithLabelProps = InputProps & {
};
export const InputWithLabel = forwardRef<HTMLInputElement, InputWithLabelProps>(
({ label, ...props }, ref) => {
({ label, className, ...props }, ref) => {
return (
<div>
<div className={className}>
<Label htmlFor={label} className="block mb-2">
{label}
</Label>