mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 21:57:16 +01:00
Rename website column. Table component.
This commit is contained in:
parent
a09867f28c
commit
000f84df96
8 changed files with 66 additions and 9 deletions
|
|
@ -1,10 +1,32 @@
|
|||
import React from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import Page from './Page';
|
||||
import Table from './Table';
|
||||
import { get } from 'lib/web';
|
||||
|
||||
const columns = [
|
||||
{ key: 'name', label: 'Name' },
|
||||
{ key: 'domain', label: 'Domain' },
|
||||
];
|
||||
|
||||
export default function Settings() {
|
||||
const [data, setData] = useState();
|
||||
|
||||
async function loadData() {
|
||||
setData(await get(`/api/website`));
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
loadData();
|
||||
}, []);
|
||||
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<h2>Settings</h2>
|
||||
<Table columns={columns} rows={data.websites} />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue