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