mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 15:37:10 +00:00
feat: something with something
This commit is contained in:
@@ -11,7 +11,7 @@ const CompetitionSession = () => {
|
||||
const [tasks] = useState<Task[]>(mockTasks);
|
||||
const [answer, setAnswer] = useState("");
|
||||
|
||||
const currentTask = tasks.find(t => t.id === taskId) || null;
|
||||
const currentTask = tasks.find((t) => t.id === taskId) || tasks.at(0);
|
||||
|
||||
if (!taskId && tasks.length > 0) {
|
||||
return <Navigate to={`/competition/${id}/tasks/${tasks[0].id}`} replace />;
|
||||
@@ -20,22 +20,21 @@ const CompetitionSession = () => {
|
||||
const handleSubmit = () => {
|
||||
console.log("Submitting answer:", answer);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
<CompetitionHeader
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<CompetitionHeader
|
||||
title="Олимпиада DANO 2025. Индивидуальный этап"
|
||||
tasks={tasks}
|
||||
competitionId={id || ""}
|
||||
tasks={tasks}
|
||||
competitionId={id || ""}
|
||||
/>
|
||||
|
||||
|
||||
<main className="flex-1 bg-[#F8F8F8] pb-8">
|
||||
<div className="max-w-6xl mx-auto px-4 py-6">
|
||||
<div className="mx-auto max-w-6xl px-4 py-6">
|
||||
{currentTask ? (
|
||||
<div className="flex flex-col md:flex-row gap-6 font-hse-sans">
|
||||
<div className="font-hse-sans flex flex-col gap-6 md:flex-row">
|
||||
<TaskContent task={currentTask} />
|
||||
<TaskSolution
|
||||
<TaskSolution
|
||||
task={currentTask}
|
||||
solutions={mockSolutions}
|
||||
answer={answer}
|
||||
@@ -44,10 +43,8 @@ const CompetitionSession = () => {
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center items-center h-40 bg-white rounded-lg">
|
||||
<p className="font-hse-sans text-gray-500">
|
||||
Загрузка задания...
|
||||
</p>
|
||||
<div className="flex h-40 items-center justify-center rounded-lg bg-white">
|
||||
<p className="font-hse-sans text-gray-500">Загрузка задания...</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -56,4 +53,4 @@ const CompetitionSession = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default CompetitionSession;
|
||||
export default CompetitionSession;
|
||||
|
||||
Reference in New Issue
Block a user