-
- Message sent successfully.
-
-
+
+
+
Welcome to La Banquise
+
+ You will find here all of your instances and practicals
+
+
+ {dashboard && (
+ <>
+
+
+
+ Practicals
+
+
+ {dashboard.tps.map((tp) => (
+
+
+
{tp.name}
+
{tp.description}
+
+
+ Learn More
+
+
+
+
+ ))}
+
+ {dashboard.tps.length === 0 && (
+
You have no tps
+ )}
+
+
+
+
+
Instances
+
+ {dashboard.instances.map((instance) => (
+
+
+
{instance.name}
+ {instance.tp && (
+
Linked to: {instance.tp.name}
+ )}
+
+
+ Learn More
+
+ {instance.tp && (
+
+ See TP
+
+ )}
+
+
+
+ ))}
+ {dashboard.instances.length === 0 && (
+
You have no instances
+ )}
+
+
+
+
+
+
Messages
+
You have no messages
+
+
+ >
)}
>
);
-};
+}
export default Dashboard;
diff --git a/src/pages/PageTest.tsx b/src/pages/PageTest.tsx
index ec4b5c7..680d039 100644
--- a/src/pages/PageTest.tsx
+++ b/src/pages/PageTest.tsx
@@ -2,88 +2,64 @@ import axios from "axios";
import { useState } from "react";
function PageTest() {
- const [users, setUsers] = useState([
- {
- id: 1,
- name: "Alice Smith",
- email: "alice@example.com",
- role: "Admin",
- },
- {
- id: 2,
- name: "Bob Johnson",
- email: "bob@example.com",
- role: "User",
- },
- {
- id: 3,
- name: "Charlie Brown",
- email: "charlie@example.com",
- role: "User",
- },
- // Add more user data here as needed
- ]);
-
- const handleEditUser = (userId) => {
- // Logic for editing the user (e.g., opening a modal)
- alert(`Edit user with ID: ${userId}`);
- };
-
- const handleDeleteUser = (userId) => {
- // Logic for deleting the user
- const confirmDelete = window.confirm(
- "Are you sure you want to delete this user?",
- );
- if (confirmDelete) {
- setUsers(users.filter((user) => user.id !== userId));
- }
- };
-
return (
-
-
-
Manage Users
-
- {/* Users Table */}
-
-
-
-
- # |
- Name |
- Email |
- Role |
- Actions |
-
-
-
- {users.map((user, index) => (
-
- {index + 1} |
- {user.name} |
- {user.email} |
- {user.role} |
-
-
-
- |
-
- ))}
-
-
+ <>
+
+
+
Welcome to La Banquise
+
+ You will find here all of your instances and practicals
+
-
-
+
+
+
+
Practicals
+
+
+
Practical 1
+
+ This practical teaches the basics of web development using HTML,
+ CSS, and JavaScript.
+
+
+
+
+
+
+
+
+
Instances
+
+
+
Instance 1
+
+ Linked to Practical 1 - Live hands-on experience for web
+ development.
+
+
+
+
+
Instance 2
+
+ Linked to Practical 2 - Test advanced JavaScript features.
+
+
+
+
+
+
+
+
+
Messages
+
You have no messages
+
+
+ >
);
}
diff --git a/src/pages/Practical.tsx b/src/pages/Practical.tsx
index bf859a1..65a8a03 100644
--- a/src/pages/Practical.tsx
+++ b/src/pages/Practical.tsx
@@ -10,11 +10,13 @@ function Practical() {
const copyText = (copy: string) => {
navigator.clipboard.writeText(copy);
- toast("Copied!");
+ toast.success("Copied!", {
+ draggable: true,
+ theme: localStorage.getItem("theme") || "dark",
+ });
};
useEffect(() => {
- console.log("akljsbcascb");
axios.get(`/api/tps/${id}`).then((res) => {
setTp(res.data);
});
@@ -83,7 +85,7 @@ function Practical() {
Password:
navigator.clipboard.writeText(tp.pwd)}
+ onClick={() => copyText(tp.pwd)}
>
{tp.pwd}
diff --git a/src/pages/Practicals.tsx b/src/pages/Practicals.tsx
index 324f9f9..d4a0f69 100644
--- a/src/pages/Practicals.tsx
+++ b/src/pages/Practicals.tsx
@@ -23,7 +23,6 @@ function Practicals() {
{practical.name}
{practical.description}
-
Respo: {practical.respo}
Learn More