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