From 345e799c33f4ee2ced011b4e1e2950d01c525b8c Mon Sep 17 00:00:00 2001 From: ravi-p-k1 Date: Wed, 19 Feb 2025 15:24:54 -0800 Subject: [PATCH] Edited Docker file. Edited Package json and changed versions for React-Scripts and TypeScript. Solved Router bug. --- frontend/Dockerfile | 4 ++-- frontend/web-app/package.json | 4 ++-- frontend/web-app/src/Components/Router.tsx | 16 ---------------- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 0586c52..d0d7a7a 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -5,7 +5,7 @@ FROM node:16 AS build WORKDIR /app # Copy package.json and package-lock.json -COPY web-app/package*.json ./ +COPY web-app/package.json ./ # Install dependencies RUN npm install @@ -13,7 +13,7 @@ RUN npm install # Copy the rest of the frontend code COPY web-app/ . -RUN npm install react-router-dom +# RUN npm install react-router-dom # Build the React app (for production build) RUN npm run build diff --git a/frontend/web-app/package.json b/frontend/web-app/package.json index e14063e..4510da8 100644 --- a/frontend/web-app/package.json +++ b/frontend/web-app/package.json @@ -17,8 +17,8 @@ "react": "^18.0.0", "react-dom": "^18.0.0", "react-router-dom": "^6.12.1", - "react-scripts": "^3.0.1", - "typescript": "^4.9.5", + "react-scripts": "^5.0.0", + "typescript": "^4.0.0", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/frontend/web-app/src/Components/Router.tsx b/frontend/web-app/src/Components/Router.tsx index f185a3f..78e2e58 100644 --- a/frontend/web-app/src/Components/Router.tsx +++ b/frontend/web-app/src/Components/Router.tsx @@ -18,22 +18,6 @@ const router = createBrowserRouter([ path: '/login', element: , }, - { - path: '/', - element: , - }, - { - path: '/plant_detail', - element: , - }, - { - path: '/about', - element: , - }, - { - path: '/faq', - element: , - }, { path: '/signup', element: ,