Skip to content

Commit

Permalink
fix: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SSameer20 committed Dec 16, 2024
1 parent 74fdcca commit 4413df6
Show file tree
Hide file tree
Showing 35 changed files with 133 additions and 1,323 deletions.
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/LOGO.png" />
<link rel="icon" type="image/png" href="./public/icon.png" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SkinAI | AI Assistant for SKIN</title>
Expand Down
9 changes: 9 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"react-dom": "^18.3.1",
"react-dropzone": "^14.3.5",
"react-hook-form": "^7.53.0",
"react-icons": "^5.4.0",
"react-router-dom": "^6.26.2",
"sweetalert": "^2.1.2",
"tailwind-merge": "^2.5.3",
Expand Down
Binary file added client/public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 0 additions & 27 deletions client/src/App.tsx

This file was deleted.

1 change: 0 additions & 1 deletion client/src/assets/arrow-left.svg

This file was deleted.

1 change: 0 additions & 1 deletion client/src/assets/arrow-right.svg

This file was deleted.

92 changes: 92 additions & 0 deletions client/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import { Screen, userLoginStatus } from "@/utils/helper";
import { useEffect, useState } from "react";
import { Link } from "react-router-dom";

export default function Navigation({
className,
logo = "SKIN.AI",
}: {
className?: string;
logo?: string;
}) {
const [size, setSize] = useState<{ height: number; width: number }>({
height: window.innerHeight,
width: window.innerWidth,
});
const [logged, setLogged] = useState<boolean>(false);
useEffect(() => {
const status = userLoginStatus();
if (status) {
setLogged(true);
} else setLogged(false);
return () => setLogged(false);
}, []);

useEffect(() => {
window.addEventListener("resize", () => {
setSize({
height: window.innerHeight,
width: window.innerWidth,
});
});

return () =>
window.removeEventListener("resize", () => {
setSize({
height: window.innerHeight,
width: window.innerWidth,
});
});
}, [size]);

return (
<div
className={className + "w-[100%] h-[10%] flex flex-row justify-between"}
style={
size.width <= Screen.SMALL
? { padding: " 6px 16px " }
: size.width <= Screen.MEDIUM
? { padding: " 10px 20px" }
: { padding: " 15px 100px" }
}
>
<p
className="font-bold"
style={
size.width <= Screen.SMALL
? { fontSize: "20px" }
: size.width <= Screen.MEDIUM
? { fontSize: "24px" }
: { fontSize: "28px" }
}
>
{logo}
</p>

<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/app">Test</Link>
</li>
<li>
<Link to="/about">About</Link>
</li>
<li>
<Link to="/contact">Contact</Link>
</li>
{!logged && (
<div>
<li>
<Link to="/auth/login">Login</Link>
</li>
<li>
<Link to="/auth/register">Register</Link>
</li>
</div>
)}
</ul>
</div>
);
}
203 changes: 0 additions & 203 deletions client/src/components/pages/Auth.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions client/src/components/pages/Dashboard.tsx

This file was deleted.

Loading

0 comments on commit 4413df6

Please sign in to comment.