import { getAllAspectsAverageScore } from '@/modules/assessmentResult/queries/assessmentResultQueries';
import { createFileRoute } from '@tanstack/react-router'
import { z } from 'zod';

const searchParamSchema = z.object({
	detail: z.string().default("").optional(),
});

export const Route = createFileRoute("/_dashboardLayout/assessmentResult/")({
	validateSearch: searchParamSchema,

	loader: ({ context: { queryClient } }) => {
		queryClient.ensureQueryData(getAllAspectsAverageScore("0"));
	},
});