in ui/src/TenantSelector.js [42:62]
function CreateTenantModal(props: {open: boolean, setTenantId: (string) => void, onClose: () => void}) {
const classes = useStyles();
const [newTenant, setNewTenant] = useState("");
const handleSave = () => {
if (newTenant !== "") {
props.setTenantId(newTenant);
}
APIUtil(newTenant).editRouteTree({
route: {
receiver: `${newTenant}_tenant_base_route`,
}
})
props.onClose();
}
const body = (
<div className={classes.modal}>
<h2>New Tenant</h2>
<Grid container>
<TextField label="Tenant ID" variant="outlined" onChange={(e) => setNewTenant(e.target.value)} />