Skip to content

Commit

Permalink
Edited Docker file.
Browse files Browse the repository at this point in the history
Edited Package json and changed versions for React-Scripts and TypeScript.
Solved Router bug.
  • Loading branch information
ravi-p-k-1 committed Feb 19, 2025
1 parent e45cc73 commit 345e799
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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

# 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
Expand Down
4 changes: 2 additions & 2 deletions frontend/web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
16 changes: 0 additions & 16 deletions frontend/web-app/src/Components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@ const router = createBrowserRouter([
path: '/login',
element: <LoginPage/>,
},
{
path: '/',
element: <HomePage/>,
},
{
path: '/plant_detail',
element: <PlantDetailPage/>,
},
{
path: '/about',
element: <AboutPage />,
},
{
path: '/faq',
element: <FaqPage />,
},
{
path: '/signup',
element: <SignUpPage />,
Expand Down

0 comments on commit 345e799

Please sign in to comment.