import { useTest } from "@/api/tests";
import Question from "@/components/question";
import Test from "@/components/test";
import { Button, ButtonText } from "@/components/ui/button";
import Content from "@/components/ui/content";
import { Stack, useLocalSearchParams } from "expo-router";
import { View } from "react-native";
import { useToast } from "react-native-toast-notifications";
const TestScreen = () => {
const { id: idParam } = useLocalSearchParams<{ id: string }>();
const id = +idParam;
const { data, isLoading } = useTest(id);
const toast = useToast();
if (!data)
return (
<>
{isLoading && }
>
);
const handleStartTest = () => {
toast.show("Test started!", { type: "success" });
};
return (
<>
{data.is_available && }
{data.questions?.map((question) => (
))}
>
);
};
export default TestScreen;