diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx
index 78b6d25..4b34852 100644
--- a/frontend/src/contexts/AuthContext.tsx
+++ b/frontend/src/contexts/AuthContext.tsx
@@ -8,12 +8,12 @@ import {
export type User = {
name: string;
- email: string;
+ pass: string;
};
export type AuthContextProps = {
getUser: () => User | null;
- login: () => void;
+ login: (arg0: string, arg1: string) => void;
logout: () => void;
isLoggedIn: () => boolean;
};
@@ -30,14 +30,14 @@ export function useAuth() {
}
export function AuthProvider({ children }: { children: ReactElement }) {
- const [user, setUser] = useState
(null);
+ const [user, setUser] = useState(null);
- const login = useCallback(() => {
+ const login = useCallback((name: string, pass: string) => {
setUser({
- name: 'John Doe',
- email: '',
+ name: name,
+ pass: pass,
});
- }, []);
+ }, [setUser]);
const logout = useCallback(() => {
setUser(null);
diff --git a/frontend/src/library/button.tsx b/frontend/src/library/button.tsx
index c9ba58a..af848eb 100644
--- a/frontend/src/library/button.tsx
+++ b/frontend/src/library/button.tsx
@@ -15,6 +15,7 @@ type ButtonProps = {
fontSize?: string;
rounded?: string;
buttonSize?: string;
+ type?: "submit" | "reset" | "button"
borderColor?: string;
hoverColor?: string;
hoverScale?: boolean;
@@ -36,11 +37,13 @@ const Button: React.FC = ({
borderColor = 'border-black',
hoverColor = 'hover:bg-lime-600',
hoverScale = true,
+ type = 'button',
onClick,
className = '',
}) => {
return (