mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
| Package | From | To | |----------------------------------|-----------|---------| react-router | ( new ) | 7.8.2 | react-router-dom | 6.22.3 | ( del ) | @vitejs/plugin-react-swc | 3.10.2 | 4.0.1 | vite | 6.3.5 | 7.1.4 |
35 lines
926 B
TypeScript
35 lines
926 B
TypeScript
import { useLocation, useSearchParams } from "react-router";
|
|
|
|
import AuthLayout from "@components/AuthLayout";
|
|
|
|
export default function LoginRoute() {
|
|
const [sq] = useSearchParams();
|
|
const location = useLocation();
|
|
const deviceId = sq.get("deviceId") || location.state?.deviceId;
|
|
|
|
if (deviceId) {
|
|
return (
|
|
<AuthLayout
|
|
showCounter={true}
|
|
title="Connect your JetKVM to the cloud"
|
|
description="Unlock remote access and advanced features for your device"
|
|
action="Log in & Connect device"
|
|
// Header CTA
|
|
cta="Don't have an account?"
|
|
ctaHref={`/signup?${sq.toString()}`}
|
|
/>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<AuthLayout
|
|
title="Log in to your JetKVM account"
|
|
description="Log in to access and manage your devices securely"
|
|
action="Log in"
|
|
// Header CTA
|
|
cta="New to JetKVM?"
|
|
ctaHref={`/signup?${sq.toString()}`}
|
|
/>
|
|
);
|
|
}
|