Skip to content

Commit

Permalink
Fix ESLint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dylkaw committed Oct 31, 2024
1 parent 4b8b23e commit 5428fb8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
13 changes: 5 additions & 8 deletions frontend/components/collab/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { Input } from "@/components/ui/input";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { ScrollArea } from "@/components/ui/scroll-area";
import { Send, Play, HelpCircle, X } from "lucide-react";
import { set } from "zod";

const chatTarget: string[] = ["partner", "ai"];
import { Send } from "lucide-react";

export default function Chat() {
const [chatTarget, setChatTarget] = useState<string>("partner");
Expand Down Expand Up @@ -59,8 +56,8 @@ export default function Chat() {
<TabsContent value="partner" className="h-full">
<ScrollArea className="h-[calc(70vh-280px)]">
<div className="pr-4 space-y-2">
{partnerMessages.map((msg) => (
<div>{msg}</div>
{partnerMessages.map((msg, index) => (
<div key={index}>{msg}</div>
))}
<div ref={lastMessageRef} />
</div>
Expand All @@ -69,8 +66,8 @@ export default function Chat() {
<TabsContent value="ai" className="h-full">
<ScrollArea className="h-[calc(70vh-280px)]">
<div className="pr-4 space-y-2">
{aiMessages.map((msg) => (
<div>{msg}</div>
{aiMessages.map((msg, index) => (
<div key={index}>{msg}</div>
))}
<div ref={lastMessageRef} />
</div>
Expand Down
4 changes: 1 addition & 3 deletions frontend/components/collab/code-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"use client";

import React, { useState, useEffect, useRef } from "react";
import React, { useState } from "react";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/collab/collab-room.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState, useEffect, useRef } from "react";
import React from "react";
import { Button } from "@/components/ui/button";
import { X } from "lucide-react";
import Chat from "./chat";
import CodeEditor from "./code-editor";
import QuestionDisplay from "./question-display";

export default function CollabRoom({ roomId }: { roomId: String }) {
export default function CollabRoom({ roomId }: { roomId: string }) {
return (
<div className="h-full flex flex-col mx-4 p-4">
<header className="flex justify-between border-b">
Expand Down
11 changes: 6 additions & 5 deletions frontend/components/collab/question-display.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, useRef } from "react";
import React from "react";
import {
Card,
CardContent,
Expand All @@ -7,16 +7,16 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Question } from "@/lib/schemas/question-schema";
// import { Question } from "@/lib/schemas/question-schema";

const difficultyColors = {
Easy: "bg-green-500",
Medium: "bg-yellow-500",
Hard: "bg-red-500",
};

export default function QuestionDisplay({ question }: { question: Question }) {
return (
// export default function QuestionDisplay({ question }: { question: Question }) {
// return (
// <Card className="flex-shrink-0">
// <CardHeader>
// <CardTitle>{question.title}</CardTitle>
Expand All @@ -31,7 +31,8 @@ export default function QuestionDisplay({ question }: { question: Question }) {
// <p>{question.description}</p>
// </CardContent>
// </Card>

export default function QuestionDisplay() {
return (
<Card className="flex-shrink-0">
<CardHeader>
<CardTitle>Placeholder Title</CardTitle>
Expand Down

0 comments on commit 5428fb8

Please sign in to comment.