move join url
All checks were successful
checks-impure / test (pull_request) Successful in 1m59s
checks / test (pull_request) Successful in 2m51s

This commit is contained in:
Johannes Kirschbauer 2023-11-20 09:29:46 +01:00
parent f7f3bd2e35
commit b83a440cb2
Signed by: hsjobeki
SSH Key Fingerprint: SHA256:vX3utDqig7Ph5L0JPv87ZTPb/w7cMzREKVZzzLFg9qU
4 changed files with 18 additions and 7 deletions

View File

@ -26,7 +26,7 @@ export default function Manage() {
},
{
flake_dir: values.flakeDir,
}
},
);
} catch (e) {
const error = e as AxiosError<HTTPValidationError>;
@ -35,14 +35,14 @@ export default function Manage() {
if (maybeDetail?.loc && maybeDetail?.msg) {
const urlError = error.response?.data.detail?.find((detail) =>
detail.loc.includes("url")
detail.loc.includes("url"),
);
urlError &&
methods.setError("flakeTemplateUrl", {
message: urlError.msg,
});
const flakeDirError = error.response?.data.detail?.find(
(detail) => detail.loc.includes("flake_dir")
(detail) => detail.loc.includes("flake_dir"),
);
flakeDirError &&
methods.setError("flakeDir", {

View File

@ -1,11 +1,22 @@
import { Button } from "@mui/material";
import Link from "next/link";
export default function Manage() {
return (
<div>
Select
<Link href="/manage/join">Join</Link>
<Link href="/manage/create">Create</Link>
<Button>
<Link href="/manage/join">Join</Link>
</Button>
<Button>
<Link href="/manage/create">Create</Link>
</Button>
<ul>
<li>History</li>
<li>Recent History</li>
<li>Ancient History</li>
<li>Cosmic History</li>
</ul>
</div>
);
}

View File

@ -68,7 +68,7 @@ export function ClanToolbar(props: ClanToolbarProps) {
const handleClick = (
event: React.MouseEvent<HTMLButtonElement>,
idx: number
idx: number,
) => {
setAnchorEl(event.currentTarget);
setOpenIdx(idx);

View File

@ -41,7 +41,7 @@ const menuEntries: MenuEntry[] = [
{
icon: <WorkspacesIcon />,
label: "Manage",
to: "/join",
to: "/manage",
},
{
icon: <BackupIcon />,