mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 17:11:20 -08:00
Fix page not opening (#359)
This commit is contained in:
1 parent
7bc208fec3
commit
df43e5fcdf
3 files changed
+5
-2
No files matched your search
@@ -6,11 +6,13 @@ import { ArrowLeftIcon, ArrowRightIcon } from './icon/ArrowIcons';
|
||||
export function ArrowLink({
|
||||
to,
|
||||
children,
|
||||
state,
|
||||
direction = 'left',
|
||||
variant = 'flat',
|
||||
}: {
|
||||
to: string;
|
||||
children: ReactNode;
|
||||
state?: { SerialPort?: string };
|
||||
direction?: 'left' | 'right';
|
||||
variant?: 'flat' | 'boxed' | 'boxed-2';
|
||||
}) {
|
||||
@@ -31,7 +33,7 @@ export function ArrowLink({
|
||||
}, [variant]);
|
||||
|
||||
return (
|
||||
<NavLink to={to} className={classes}>
|
||||
<NavLink to={to} state={state} className={classes}>
|
||||
{direction === 'left' && (
|
||||
<div className="flex flex-col justify-center">
|
||||
<ArrowLeftIcon></ArrowLeftIcon>
|
||||
|
||||
@@ -157,6 +157,7 @@ export function ConnectTrackersPage() {
|
||||
</ArrowLink> */}
|
||||
<ArrowLink
|
||||
to="/settings/serial"
|
||||
state={{ SerialPort: 'Auto' }}
|
||||
direction="right"
|
||||
variant={state.alonePage ? 'boxed-2' : 'boxed'}
|
||||
>
|
||||
|
||||
@@ -73,7 +73,7 @@ export function Serial() {
|
||||
useEffect(() => {
|
||||
sendRPCPacket(RpcMessage.SerialDevicesRequest, new SerialDevicesRequestT());
|
||||
const typedState: { serialPort: string } = state as any;
|
||||
if (typedState.serialPort) {
|
||||
if (typedState?.serialPort) {
|
||||
reset({ port: typedState.serialPort });
|
||||
}
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user