vaulterm/frontend/app/index.tsx
2024-11-08 18:53:30 +00:00

14 lines
333 B
TypeScript

import React from "react";
import { Redirect } from "expo-router";
import { useTermSession } from "@/stores/terminal-sessions";
export default function index() {
const { sessions, curSession } = useTermSession();
return (
<Redirect
href={sessions.length > 0 && curSession >= 0 ? "/terminal" : "/hosts"}
/>
);
}