fix: ts issues
This commit is contained in:
parent
5ad47cce1a
commit
c73f1d5b38
6 changed files with 20 additions and 17 deletions
|
|
@ -172,7 +172,8 @@ export const SnapshotsTable = ({ snapshots, repositoryId, backups }: Props) => {
|
|||
<div className="flex items-center gap-2">
|
||||
<Link
|
||||
hidden={!backup}
|
||||
to={backup ? `/backups/${backup.id}` : "."}
|
||||
to={backup ? `/backups/$scheduleId` : "."}
|
||||
params={backup ? { scheduleId: String(backup.id) } : {}}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="hover:underline"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import {
|
|||
FormMessage,
|
||||
} from "~/client/components/ui/form";
|
||||
import { authMiddleware } from "~/middleware/auth";
|
||||
import type { Route } from "./+types/onboarding";
|
||||
import { AuthLayout } from "~/client/components/auth-layout";
|
||||
import { Input } from "~/client/components/ui/input";
|
||||
import { Button } from "~/client/components/ui/button";
|
||||
|
|
@ -22,16 +21,6 @@ import { useNavigate } from "@tanstack/react-router";
|
|||
|
||||
export const clientMiddleware = [authMiddleware];
|
||||
|
||||
export function meta(_: Route.MetaArgs) {
|
||||
return [
|
||||
{ title: "Zerobyte - Onboarding" },
|
||||
{
|
||||
name: "description",
|
||||
content: "Welcome to Zerobyte. Create your admin account to get started.",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const onboardingSchema = type({
|
||||
username: type("2<=string<=30").pipe((str) => str.trim().toLowerCase()),
|
||||
email: type("string.email").pipe((str) => str.trim().toLowerCase()),
|
||||
|
|
|
|||
|
|
@ -95,10 +95,11 @@ export const SnapshotFileBrowser = (props: Props) => {
|
|||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Link
|
||||
to={
|
||||
to={backupId ? "/backups/$backupId/$snapshotId/restore" : "/repositories/$repoId/$snapId/restore"}
|
||||
params={
|
||||
backupId
|
||||
? `/backups/${backupId}/${snapshot.short_id}/restore`
|
||||
: `/repositories/${repositoryId}/${snapshot.short_id}/restore`
|
||||
? { backupId, snapshotId: snapshot.short_id }
|
||||
: { repoId: repositoryId, snapId: snapshot.short_id }
|
||||
}
|
||||
className={buttonVariants({ variant: "primary", size: "sm" })}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -126,7 +126,11 @@ export function SnapshotDetailsPage({ repositoryId, snapshotId }: { repositoryId
|
|||
<div>
|
||||
<span className="text-muted-foreground">Backup Schedule:</span>
|
||||
<p>
|
||||
<Link to={`/backups/$backupScheduleId`} className="text-primary hover:underline">
|
||||
<Link
|
||||
to="/backups/$scheduleId"
|
||||
className="text-primary hover:underline"
|
||||
params={{ scheduleId: backupSchedule?.shortId || "" }}
|
||||
>
|
||||
{backupSchedule?.name}
|
||||
</Link>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import {
|
|||
import { VolumeIcon } from "~/client/components/volume-icon";
|
||||
import { parseError } from "~/client/lib/errors";
|
||||
import { cn } from "~/client/lib/utils";
|
||||
import type { Route } from "./+types/volume-details";
|
||||
import { VolumeInfoTabContent } from "../tabs/info";
|
||||
import { FilesTabContent } from "../tabs/files";
|
||||
import type { VolumeStatus } from "~/client/lib/types";
|
||||
|
|
|
|||
|
|
@ -3,4 +3,13 @@ import { OnboardingPage } from "~/client/modules/auth/routes/onboarding";
|
|||
|
||||
export const Route = createFileRoute("/(auth)/onboarding")({
|
||||
component: OnboardingPage,
|
||||
head: () => ({
|
||||
meta: [
|
||||
{ title: "Zerobyte - Onboarding" },
|
||||
{
|
||||
name: "description",
|
||||
content: "Welcome to Zerobyte. Create your admin account to get started.",
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue