diff --git a/src/components/EditorPanel.jsx b/src/components/EditorPanel.jsx
index fc7c247..fadcc5d 100644
--- a/src/components/EditorPanel.jsx
+++ b/src/components/EditorPanel.jsx
@@ -3,14 +3,32 @@ import Editor from '@monaco-editor/react';
export default function EditorPanel({ code, onChange }) {
return (
-
+
onChange(v || '')}
theme="vs-dark"
+ options={{
+ fontSize: 16,
+ padding: { top: 10, bottom: 10 },
+ minimap: { enabled: false },
+ scrollbar: {
+ verticalScrollbarSize: 8,
+ horizontalScrollbarSize: 8,
+ },
+ lineNumbers: 'on',
+ scrollBeyondLastLine: false,
+ }}
/>
);
-}
\ No newline at end of file
+}
diff --git a/src/pages/AssignmentPage.jsx b/src/pages/AssignmentPage.jsx
index 5bd8855..65f9ccd 100644
--- a/src/pages/AssignmentPage.jsx
+++ b/src/pages/AssignmentPage.jsx
@@ -1,5 +1,7 @@
import React, { useState } from "react";
import "../scss/components/_assignment.scss";
+import { useEffect } from "react";
+
const AssignmentPage = () => {
const [studentName, setStudentName] = useState("");
@@ -13,6 +15,11 @@ const AssignmentPage = () => {
const [showModal, setShowModal] = useState(false);
const [editingIndex, setEditingIndex] = useState(null);
+ useEffect(() => {
+ document.title = "Assignment";
+ }, []);
+
+
const resetForm = () => {
setStudentName("");
setCampID("");
@@ -37,12 +44,10 @@ const AssignmentPage = () => {
};
if (editingIndex !== null) {
- // Edit mode: update the project at the index
const updatedProjects = [...projects];
updatedProjects[editingIndex] = newProject;
setProjects(updatedProjects);
} else {
- // New submission
setProjects([...projects, newProject]);
}
@@ -58,7 +63,7 @@ const AssignmentPage = () => {
setProgramID(project.programID);
setTitle(project.title);
setDescription(project.description);
- setFile(null); // File can't be set again for editing, usually. You could add note about this.
+ setFile(null);
setEditingIndex(index);
setShowModal(true);
};
@@ -70,8 +75,10 @@ const AssignmentPage = () => {
return (
-
📘 Assignments
-
+
+
Assignments
+
+
{showModal && (
@@ -80,110 +87,69 @@ const AssignmentPage = () => {
)}
-
-
📋 Projects
- {projects.map((project, index) => (
-
-
- Student Name: {project.studentName} | CampID: {project.campID} | ProgramID: {project.programID}
-
-
{project.title}
-
{project.description}
- {project.fileName && (
-
Uploaded File: {project.fileName}
+ {projects.length > 0 && (
+
+ {/*
📋 Projects
*/}
+ {projects.map((project, index) => (
+
+
+ Student Name: {project.studentName} | CampID: {project.campID} | ProgramID: {project.programID}
+
+
{project.title}
+
{project.description}
+ {project.fileName &&
Uploaded File: {project.fileName}
}
+
+
+
+
+
+
+
+ ))}
+
)}
-
-
-
-
-
-
-
- ))}
-
-
);
};
diff --git a/src/pages/CodeEditor.jsx b/src/pages/CodeEditor.jsx
index 43a9b5d..7c0ea3c 100644
--- a/src/pages/CodeEditor.jsx
+++ b/src/pages/CodeEditor.jsx
@@ -1,131 +1,203 @@
-// Page - Code Editor
import { useEffect, useState } from "react";
-import CodeMirror from "@uiw/react-codemirror";
-import { javascript } from "@codemirror/lang-javascript";
-import { html } from "@codemirror/lang-html";
-import { css } from "@codemirror/lang-css";
-import { vscodeDark } from "@uiw/codemirror-theme-vscode";
import EditorPanel from "../components/EditorPanel";
-import PreviewPanel from "../components/PreviewPanel";
const PageCodeEditor = () => {
-
const [code, setCode] = useState(`# Write your Battlesnake code here\ndef move(board):\n return { 'move': 'up' }`);
- // State for storing code in different tabs
- const [htmlCode, setHtmlCode] = useState(
- "