Update import paths for Types
This commit is contained in:
parent
2ba10e837a
commit
9dd47f3d71
2 changed files with 8 additions and 8 deletions
|
@ -1,30 +1,30 @@
|
|||
import { NewUser } from "../Types/Users";
|
||||
import { NewUser } from "../Types/goTypes";
|
||||
|
||||
function LoginCheck(props: { username: string; password: string }): number {
|
||||
//Example users for testing without backend, remove when using backend
|
||||
const admin: NewUser = {
|
||||
userName: "admin",
|
||||
username: "admin",
|
||||
password: "123",
|
||||
};
|
||||
const pmanager: NewUser = {
|
||||
userName: "pmanager",
|
||||
username: "pmanager",
|
||||
password: "123",
|
||||
};
|
||||
const user: NewUser = {
|
||||
userName: "user",
|
||||
username: "user",
|
||||
password: "123",
|
||||
};
|
||||
|
||||
//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;
|
||||
} else if (
|
||||
props.username === pmanager.userName &&
|
||||
props.username === pmanager.username &&
|
||||
props.password === pmanager.password
|
||||
) {
|
||||
return 2;
|
||||
} else if (
|
||||
props.username === user.userName &&
|
||||
props.username === user.username &&
|
||||
props.password === user.password
|
||||
) {
|
||||
return 3;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Link } from "react-router-dom";
|
||||
import { Project } from "../Types/Project";
|
||||
import { Project } from "../Types/goTypes";
|
||||
|
||||
/**
|
||||
* The props for the ProjectsProps component
|
||||
|
|
Loading…
Reference in a new issue