Small fixes

This commit is contained in:
Peter KW 2024-03-28 01:34:49 +01:00
parent b6d1a2926e
commit 19cb8dbd94
2 changed files with 13 additions and 9 deletions

View file

@ -19,9 +19,12 @@ function ProjectInfoModal(props: {
className="fixed inset-0 bg-black bg-opacity-30 backdrop-blur-sm
flex justify-center items-center"
>
<div className="border-4 border-black bg-white p-2 rounded-2xl text-center h-[41vh] w-[40vw] flex flex-col">
<div className="border-4 border-black bg-white p-2 rounded-2xl text-center h-[47vh] w-[40] flex flex-col">
<div className="pl-20 pr-20">
<h1 className="font-bold text-[32px] mb-[20px]">Project members:</h1>
<h1 className="font-bold text-[32px] mb-[20px]">
{localStorage.getItem("projectName") ?? ""}
</h1>
<h2 className="font-bold text-[24px] mb-[20px]">Project members:</h2>
<div className="border-2 border-black p-2 rounded-lg text-center overflow-scroll h-[26vh]">
<ul className="text-left font-medium space-y-2">
<div></div>
@ -51,12 +54,11 @@ function ProjectInfoModal(props: {
}}
type="button"
/>
<Link to={"/addUserToProject"}>
<Link to={"/adminProjectAddMember"}>
<Button
text={"Add Member"}
onClick={function (): void {
// Might wanna change this later
localStorage.setItem("projectName", props.projectname);
return;
}}
type="button"
/>

View file

@ -2,7 +2,6 @@ import { useState } from "react";
import { NewProject } from "../Types/goTypes";
import ProjectInfoModal from "./ProjectInfoModal";
import UserInfoModal from "./UserInfoModal";
import DeleteUser from "./DeleteUser";
/**
* A list of projects for admin manage projects page, that sets an onClick
@ -28,8 +27,9 @@ export function ProjectListAdmin(props: {
setUserModalVisible(true);
};
const handleClickProject = (username: string): void => {
setProjectname(username);
const handleClickProject = (projectname: string): void => {
setProjectname(projectname);
localStorage.setItem("projectName", projectname);
setProjectModalVisible(true);
};
@ -55,7 +55,9 @@ export function ProjectListAdmin(props: {
manageMember={true}
onClose={handleCloseUser}
//TODO: CHANGE TO REMOVE USER FROM PROJECT
onDelete={() => DeleteUser}
onDelete={() => {
return;
}}
isVisible={userModalVisible}
username={username}
/>