feat(docs): add docs and restructure

This commit is contained in:
BennyKok
2023-12-28 00:06:32 +08:00
parent afc67bc0b9
commit 498374195d
56 changed files with 3751 additions and 54 deletions
+32
View File
@@ -0,0 +1,32 @@
import { APIKeyList } from "@/components/APIKeyList";
import { getAPIKeys } from "@/server/curdApiKeys";
import { auth } from "@clerk/nextjs";
export default function Page() {
return <Component />;
}
async function Component() {
const { userId } = await auth();
if (!userId) {
return <div>No auth</div>;
}
const workflow = await getAPIKeys();
return (
<div className="w-full">
<APIKeyList
data={workflow.map((x) => {
return {
id: x.id,
name: x.name,
date: x.updated_at,
endpoint: `****${x.key.slice(-4)}`,
};
})}
/>
</div>
);
}