-
- {messages.length === 0 &&
-
- Ask me something like "should I take CS214 and CS211 at the same time?"
+
+
+
+ {messages.length === 0 && (
+
+ Ask me something like "should I take CS214 and CS211 at the
+ same time?"
- }
+ )}
{messages.map((msg, i) => (
))}
- {isLoading &&
-
- }
+ {isLoading && (
+
+ )}
-
-
- )
-}
\ No newline at end of file
+ );
+}
diff --git a/src/app/eme/fetch-eme.tsx b/src/app/eme/fetch-eme.tsx
index c2db9dd..08eac7d 100644
--- a/src/app/eme/fetch-eme.tsx
+++ b/src/app/eme/fetch-eme.tsx
@@ -1,20 +1,22 @@
-import { EME_API_BASE_URL } from "@/constants/eme";
+import { EME_API_BASE_URL } from '@/constants/eme';
export interface UseEmeResult {
- generation: string,
- isLoading: boolean,
- isError: boolean,
+ generation: string;
+ isLoading: boolean;
+ isError: boolean;
}
-export async function fetchEmeResponse(message: string): Promise
> {
-
+export async function fetchEmeResponse(
+ message: string
+): Promise> {
const response = await fetch(`${EME_API_BASE_URL}/chat`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message }),
});
- if (!response.ok) throw new Error(`eme responded with status ${response.status}`);
+ if (!response.ok)
+ throw new Error(`eme responded with status ${response.status}`);
if (!response.body) throw new Error(`No response body`);
@@ -25,10 +27,10 @@ export async function fetchEmeResponse(message: string): Promise {
+export async function fetchEmeHealth(): Promise<{ status: string }> {
const response = await fetch(`${EME_API_BASE_URL}/health`);
-
+
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return response.json();
-}
\ No newline at end of file
+}
diff --git a/src/app/eme/page.tsx b/src/app/eme/page.tsx
index 7314fc3..1eba0b6 100644
--- a/src/app/eme/page.tsx
+++ b/src/app/eme/page.tsx
@@ -1,8 +1,7 @@
-"use client"
-import EmeChat from "./eme-chat"
+'use client';
+
+import EmeChat from './eme-chat';
export default function Page() {
- return (
-
- )
-}
\ No newline at end of file
+ return ;
+}
diff --git a/src/components/list-serv-signup.tsx b/src/components/list-serv-signup.tsx
index 6c7dad9..074f71f 100644
--- a/src/components/list-serv-signup.tsx
+++ b/src/components/list-serv-signup.tsx
@@ -1,21 +1,22 @@
-"use client";
+'use client';
-import { useState } from "react";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
+import { useState } from 'react';
+
+import { Button } from '@/components/ui/button';
import {
Dialog,
+ DialogClose,
DialogContent,
DialogDescription,
+ DialogFooter,
DialogHeader,
DialogTitle,
- DialogFooter,
- DialogClose,
-} from "@/components/ui/dialog";
+} from '@/components/ui/dialog';
+import { Input } from '@/components/ui/input';
export default function ListservSignup() {
- const [firstName, setFirstName] = useState("");
- const [lastName, setLastName] = useState("");
+ const [firstName, setFirstName] = useState('');
+ const [lastName, setLastName] = useState('');
const [showDialog, setShowDialog] = useState(false);
const handleSubmit = (e: React.FormEvent) => {
@@ -27,29 +28,29 @@ export default function ListservSignup() {
const mailtoLink = `mailto:listserv@listserv.it.northwestern.edu?subject=&body=SUBSCRIBE emergingcoders ${firstName} ${lastName}`;
window.location.href = mailtoLink;
setShowDialog(false);
- setFirstName("");
- setLastName("");
+ setFirstName('');
+ setLastName('');
};
return (
-