Added path + fixed import
This commit is contained in:
parent
8a2152395f
commit
92119dd49e
3 changed files with 9 additions and 3 deletions
|
@ -4,6 +4,7 @@ import { api } from "../API/API";
|
|||
import Logo from "../assets/Logo.svg";
|
||||
import Button from "./Button";
|
||||
import InputField from "./InputField";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
export default function Register(): JSX.Element {
|
||||
const [username, setUsername] = useState<string>();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { Link } from "react-router-dom";
|
||||
import { User } from "../Types/goTypes";
|
||||
import { PublicUser } from "../Types/goTypes";
|
||||
|
||||
/**
|
||||
* The props for the UserProps component
|
||||
*/
|
||||
interface UserProps {
|
||||
users: User[];
|
||||
users: PublicUser[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ export function UserListAdmin(props: UserProps): JSX.Element {
|
|||
<div>
|
||||
<ul className="font-bold underline text-[30px] cursor-pointer padding">
|
||||
{props.users.map((user) => (
|
||||
<Link to="/admin-view-user" key={user.userId} state={user.username}>
|
||||
<Link to="/adminUserInfo" key={user.userId} state={user.username}>
|
||||
<li className="pt-5" key={user.userId}>
|
||||
{user.username}
|
||||
</li>
|
||||
|
|
|
@ -9,6 +9,7 @@ import AdminAddProject from "./Pages/AdminPages/AdminAddProject";
|
|||
import AdminManageProjects from "./Pages/AdminPages/AdminManageProjects";
|
||||
import AdminManageUsers from "./Pages/AdminPages/AdminManageUsers";
|
||||
import AdminAddUser from "./Pages/AdminPages/AdminAddUser";
|
||||
import AdminViewUserInfo from "./Pages/AdminPages/AdminViewUserInfo";
|
||||
|
||||
// This is where the routes are mounted
|
||||
const router = createBrowserRouter([
|
||||
|
@ -36,6 +37,10 @@ const router = createBrowserRouter([
|
|||
path: "/adminAddUser",
|
||||
element: <AdminAddUser />,
|
||||
},
|
||||
{
|
||||
path: "/adminUserInfo",
|
||||
element: <AdminViewUserInfo />,
|
||||
},
|
||||
{
|
||||
path: "/adminManageProject",
|
||||
element: <AdminManageProjects />,
|
||||
|
|
Loading…
Reference in a new issue