Minor design and import changes

This commit is contained in:
Peter KW 2024-04-13 21:10:37 +02:00
parent bcac9c020e
commit 0e2b62f5ba
4 changed files with 10 additions and 6 deletions

View file

@ -22,10 +22,12 @@ export function ProjectListAdmin(props: {
const [projectName, setProjectName] = useState("");
const [userModalVisible, setUserModalVisible] = useState(false);
const [username, setUsername] = useState("");
const [userRole, setUserRole] = useState("");
const [search, setSearch] = useState("");
const handleClickUser = (username: string): void => {
const handleClickUser = (username: string, userRole: string): void => {
setUsername(username);
setUserRole(userRole);
setUserModalVisible(true);
};
@ -41,6 +43,7 @@ export function ProjectListAdmin(props: {
const handleCloseUser = (): void => {
setUsername("");
setUserRole("");
setUserModalVisible(false);
};
@ -59,6 +62,7 @@ export function ProjectListAdmin(props: {
onClose={handleCloseUser}
username={username}
projectName={projectName}
role={userRole}
/>
)}
<div>
@ -70,7 +74,7 @@ export function ProjectListAdmin(props: {
setSearch(e.target.value);
}}
/>
<ul className="mt-3 border-2 text-left border-black rounded-2xl px-2 divide-y divide-gray-300 font-semibold text-[30px] cursor-pointer overflow-auto h-[65vh] w-[50vw]">
<ul className="mt-3 border-2 text-left border-black rounded-2xl px-2 divide-y divide-gray-300 font-semibold text-[30px] cursor-pointer overflow-auto h-[60vh] w-[40vw]">
{props.projects
.filter((project) => {
return search.toLowerCase() === ""

View file

@ -45,7 +45,7 @@ export function UserListAdmin(props: { users: string[] }): JSX.Element {
setSearch(e.target.value);
}}
/>
<ul className="mt-3 border-2 text-left border-black rounded-2xl px-2 divide-y divide-gray-300 font-semibold text-[30px] transition-all cursor-pointer overflow-auto h-[65vh] w-[50vw]">
<ul className="mt-3 border-2 text-left border-black rounded-2xl px-2 divide-y divide-gray-300 font-semibold text-[30px] transition-all cursor-pointer overflow-auto h-[60vh] w-[40vw]">
{props.users
.filter((user) => {
return search.toLowerCase() === ""

View file

@ -8,7 +8,7 @@ function UserProjectListAdmin(props: { username: string }): JSX.Element {
GetProjects({ setProjectsProp: setProjects, username: props.username });
return (
<div className="border-2 border-black bg-white rounded-lg text-left overflow-auto h-[15vh] font-medium">
<div className="border-2 border-black bg-white rounded-2xl text-left overflow-auto h-[15vh] font-medium">
<ul className="divide-y-2">
{projects.map((project) => (
<li className="mx-2 my-1" key={project.id}>

View file

@ -1,11 +1,11 @@
import { Link } from "react-router-dom";
import BackButton from "../../Components/BackButton";
import BasicWindow from "../../Components/BasicWindow";
import Button from "../../Components/Button";
import { ProjectListAdmin } from "../../Components/ProjectListAdmin";
import { Project } from "../../Types/goTypes";
import GetProjects from "../../Components/GetProjects";
import { useState } from "react";
import NavButton from "../../Components/NavButton";
function AdminManageProjects(): JSX.Element {
const [projects, setProjects] = useState<Project[]>([]);
@ -26,7 +26,7 @@ function AdminManageProjects(): JSX.Element {
type="button"
/>
</Link>
<BackButton />
<NavButton navTo="/admin" label={"Back"} />
</>
);