mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-23 04:19:48 +00:00
34 lines
887 B
TypeScript
34 lines
887 B
TypeScript
import { useState } from "react";
|
|
|
|
import { Heading, HStack } from "@chakra-ui/react";
|
|
import { HelpDrawer, PrettyButton } from "components";
|
|
import { intl } from "locale";
|
|
import { HostCreateModal } from "modals";
|
|
|
|
import TableWrapper from "./TableWrapper";
|
|
|
|
function Hosts() {
|
|
const [createShown, setCreateShown] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
<HStack mx={6} my={4} justifyContent="space-between">
|
|
<Heading mb={2}>{intl.formatMessage({ id: "hosts.title" })}</Heading>
|
|
<HStack>
|
|
<HelpDrawer section="Hosts" />
|
|
<PrettyButton size="sm" onClick={() => setCreateShown(true)}>
|
|
{intl.formatMessage({ id: "host.create" })}
|
|
</PrettyButton>
|
|
</HStack>
|
|
</HStack>
|
|
<TableWrapper onCreateClick={() => setCreateShown(true)} />
|
|
<HostCreateModal
|
|
isOpen={createShown}
|
|
onClose={() => setCreateShown(false)}
|
|
/>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default Hosts;
|