+
- {driver.cars!.map((car) => (
-
- ))}
+ {
+ driver.cars?.map((car) => (
+
+ ))}
);
diff --git a/frontend/src/components/Loading.tsx b/frontend/src/components/Loading.tsx
index 4148d6f2..62e3ca2c 100644
--- a/frontend/src/components/Loading.tsx
+++ b/frontend/src/components/Loading.tsx
@@ -2,15 +2,13 @@ import { Spinner } from "react-activity";
const Loading = ({ loading }: { loading: boolean }) => {
return (
-
-
+
+
);
};
-
export default Loading;
diff --git a/frontend/src/context/AuthContext.tsx b/frontend/src/context/AuthContext.tsx
index 82e53b3c..a78c4c85 100644
--- a/frontend/src/context/AuthContext.tsx
+++ b/frontend/src/context/AuthContext.tsx
@@ -1,9 +1,9 @@
-import React, { createContext, useState } from "react";
+import { createContext, PropsWithChildren, useState } from "react";
import { AuthContextType } from "../types/user.types";
const AuthContext = createContext({});
-export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
+export const AuthProvider = ({ children }: PropsWithChildren) => {
const [auth, setAuth] = useState
();
return (
diff --git a/frontend/src/pages/ViewProfile.tsx b/frontend/src/pages/ViewProfile.tsx
index b1d98596..ee7e0bfe 100644
--- a/frontend/src/pages/ViewProfile.tsx
+++ b/frontend/src/pages/ViewProfile.tsx
@@ -53,7 +53,9 @@ const ViewProfile = () => {
activeSection === "vehicle"
? "text-textgreen"
: "text-white hover:text-textgreen"
- }`}>
+ }`}
+ data-testid="vehicle-button"
+ >
Vehicles