Skip to content

Commit

Permalink
Fix submission typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
akamya997 committed Mar 6, 2024
1 parent 6b05c5c commit 50a37ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/SubmissionDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SubmissionDetail: React.FC<SubmissionDetailProps> = (props) => {
</thead>
<tbody>
<tr className="bg-base-200">
<td className="border-r border-t">{props.data.uid}</td>
<td className="border-r border-t">{props.data.UID}</td>
<td className="border-l border-t">{props.data.problem.slug}</td>
<td className="border-l border-t">{props.data.language}</td>
<td className="border-l border-t">
Expand Down
2 changes: 1 addition & 1 deletion src/components/SubmissionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const SubmissionTable: React.FC<SubmissionTableProps> = (props) => {
</thead>
<tbody>
{props.data.map((submission, idx) => (
<tr className="hover" onClick={() => navigate(submission.uid)} key={idx}>
<tr className="hover" onClick={() => navigate(submission.UID)} key={idx}>
<th>{submission.problem.title}</th>
<td>{submission.user.name}</td>
<td>{submission.language}</td>
Expand Down
4 changes: 2 additions & 2 deletions src/mocks/rest/submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SubmissionServiceModel } from "../../typings/submission";

const submissions: SubmissionServiceModel.SubmissionInfo[] = [
{
uid: "1",
UID: "1",
user: {
account: "user-1",
name: "User 1",
Expand All @@ -18,7 +18,7 @@ const submissions: SubmissionServiceModel.SubmissionInfo[] = [
status: "finished",
},
{
uid: "2",
UID: "2",
user: {
account: "user-2",
name: "User 2",
Expand Down
2 changes: 1 addition & 1 deletion src/typings/submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UserServiceModel } from "./user";

export namespace SubmissionServiceModel {
export interface SubmissionInfo {
uid: string;
UID: string;
user: UserServiceModel.UserInfo;
problem: ProblemServiceModel.ProblemInfo;
language: string;
Expand Down

0 comments on commit 50a37ef

Please sign in to comment.