curiousroamers/src/client/AdminRoot.tsx

20 lines
456 B
TypeScript

import React from 'react';
import Link from './Link';
import Button from './Button';
import ArticleTable from './ArticleTable';
/**
* @return {jsx} The root component
*/
export default function AdminRoot() {
return (
<React.Fragment>
<h1>Admin index</h1>
<Link to="/admin/new" text="Create new article" />
<Button to="/api/signout" method="DELETE" text="Signout" />
<h2>List of articles</h2>
<ArticleTable />
</React.Fragment>
);
}