19 lines
480 B
TypeScript
19 lines
480 B
TypeScript
import { useState, useEffect } from "react"
|
|
import type { NextPage } from "next"
|
|
import Head from "next/head"
|
|
|
|
const ApiKeys: NextPage = () => {
|
|
const [keys, setKeys] = useState([])
|
|
useEffect(() => {
|
|
fetch("/api/admin/api-keys").then(res => res.json()).then(setKeys)
|
|
}, [])
|
|
return (
|
|
<div>
|
|
<Head><title>API Keys - Infohliadka</title></Head>
|
|
<h1>API Keys Management</h1>
|
|
<div>{keys.length} active keys</div>
|
|
</div>
|
|
)
|
|
}
|
|
export default ApiKeys
|