mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 01:37:11 +00:00
minor fixes
This commit is contained in:
+12
-1
@@ -7,13 +7,23 @@ interface CompetitionHeaderProps {
|
||||
title: string;
|
||||
tasks: Task[];
|
||||
competitionId: string;
|
||||
setAnswer: (value: string) => void;
|
||||
setSelectedFile: (file: File | null) => void; // заглушка
|
||||
}
|
||||
|
||||
const CompetitionHeader: React.FC<CompetitionHeaderProps> = ({
|
||||
title,
|
||||
tasks,
|
||||
competitionId
|
||||
competitionId,
|
||||
setAnswer,
|
||||
setSelectedFile
|
||||
}) => {
|
||||
|
||||
const handleTaskSelect = () => {
|
||||
setAnswer("")
|
||||
setSelectedFile(null)
|
||||
}
|
||||
|
||||
return (
|
||||
<header className="bg-white shadow-sm sticky top-0 z-30 w-full">
|
||||
<div className="mx-auto max-w-6xl px-4">
|
||||
@@ -21,6 +31,7 @@ const CompetitionHeader: React.FC<CompetitionHeaderProps> = ({
|
||||
<Link
|
||||
to={`/competition/${competitionId}`}
|
||||
className="flex items-center text-gray-600 hover:text-gray-900 transition-colors font-hse-sans text-sm"
|
||||
onClick={handleTaskSelect}
|
||||
>
|
||||
<ArrowLeft className="h-4 w-4 mr-1" />
|
||||
</Link>
|
||||
|
||||
@@ -95,6 +95,8 @@ const CompetitionSession = () => {
|
||||
title={competitionTitle}
|
||||
tasks={tasks}
|
||||
competitionId={competitionId}
|
||||
setAnswer={setAnswer}
|
||||
setSelectedFile={setSelectedFile}
|
||||
/>
|
||||
|
||||
<main className="flex-1 bg-[#F8F8F8] pb-8">
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
|
||||
const SolutionStatus: React.FC<SolutionStatusProps> = ({ solution, maxPoints }) => {
|
||||
const formattedDate = solution.timestamp ? format(parseISO(solution.timestamp), "d MMMM, HH:mm", { locale: ru }) : '';
|
||||
console.log(solution, "SOLUTION STATUS")
|
||||
return (
|
||||
<div className={`${getSolutionBgColor(solution.status, solution.earned_points, maxPoints)} rounded-lg p-4 relative`}>
|
||||
<div className="flex flex-col">
|
||||
|
||||
@@ -111,6 +111,7 @@ const TaskSolution: React.FC<TaskSolutionProps> = ({
|
||||
|
||||
const handleSolutionSelect = (solution: Solution) => {
|
||||
setDisplayedSolution(solution);
|
||||
console.log(displayedSolution)
|
||||
};
|
||||
|
||||
const handleClearExistingFile = () => {
|
||||
|
||||
Reference in New Issue
Block a user