Update import paths for Types

This commit is contained in:
Davenludd 2024-03-17 16:23:37 +01:00
parent 2ba10e837a
commit 9dd47f3d71
2 changed files with 8 additions and 8 deletions

View file

@ -1,30 +1,30 @@
import { NewUser } from "../Types/Users"; import { NewUser } from "../Types/goTypes";
function LoginCheck(props: { username: string; password: string }): number { function LoginCheck(props: { username: string; password: string }): number {
//Example users for testing without backend, remove when using backend //Example users for testing without backend, remove when using backend
const admin: NewUser = { const admin: NewUser = {
userName: "admin", username: "admin",
password: "123", password: "123",
}; };
const pmanager: NewUser = { const pmanager: NewUser = {
userName: "pmanager", username: "pmanager",
password: "123", password: "123",
}; };
const user: NewUser = { const user: NewUser = {
userName: "user", username: "user",
password: "123", password: "123",
}; };
//TODO: Compare with db instead when finished //TODO: Compare with db instead when finished
if (props.username === admin.userName && props.password === admin.password) { if (props.username === admin.username && props.password === admin.password) {
return 1; return 1;
} else if ( } else if (
props.username === pmanager.userName && props.username === pmanager.username &&
props.password === pmanager.password props.password === pmanager.password
) { ) {
return 2; return 2;
} else if ( } else if (
props.username === user.userName && props.username === user.username &&
props.password === user.password props.password === user.password
) { ) {
return 3; return 3;

View file

@ -1,5 +1,5 @@
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { Project } from "../Types/Project"; import { Project } from "../Types/goTypes";
/** /**
* The props for the ProjectsProps component * The props for the ProjectsProps component