import { useLocalSearchParams } from "expo-router";
import { Text } from "react-native";
import { RoutePreviewPage } from "../../src/route/screens/route_preview";

export default function GenerateRoute() {
  const { routeId } = useLocalSearchParams<{ routeId: string }>();
  if (!routeId) {
    return <Text>Invalid town id</Text>;
  }
  return <RoutePreviewPage townId={parseInt(routeId)} />;
}
