Skip to content

Commit bd933fc

Browse files
author
Mansi2007275
committed
chore: clean up dead code and fix index.html metadata per review
Signed-off-by: Mansi2007275 <mansi@example.com>
1 parent 8843195 commit bd933fc

8 files changed

Lines changed: 4 additions & 48 deletions

File tree

docs/Installation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ npm install
134134
```bash
135135
cp .env.example .env
136136
```
137-
<!-- Ensure `REACT_APP_API_URL` points to your backend URL (e.g., `http://localhost:5000`). -->
138137
Ensure `VITE_REACT_APP_API_URL` points to your backend URL (e.g., `http://localhost:5000`).
139138
#### Start the react frontend application
140139
```bash

react-frontend/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<meta name="theme-color" content="#000000" />
7-
<meta name="description" content="React + Vite App" />
8-
<title>React App</title>
7+
<meta name="description" content="Discover Open Source Packages for Z architecture" />
8+
<title>Software Discovery Tool</title>
99
</head>
1010

1111
<body>

react-frontend/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "sdt-veryfinal",
2+
"name": "software-discovery-tool",
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
@@ -31,12 +31,7 @@
3131
"preview": "vite preview",
3232
"test": "vitest"
3333
},
34-
"eslintConfig": {
35-
"extends": [
36-
"react-app",
37-
"react-app/jest"
38-
]
39-
},
34+
4035
"browserslist": {
4136
"production": [
4237
">0.2%",

react-frontend/src/App.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

react-frontend/src/components/FaqAccordion/Accordion.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

react-frontend/src/components/SearchBar.jsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ function SearchBar({ onSearchPerformed }) {
3232
const [searchError, setSearchError] = useState("");
3333
const [lastSearchParams, setLastSearchParams] = useState(null);
3434

35-
// // const BASE_URL = useMemo(
36-
// () => normalizeApiBaseUrl(process.env.REACT_APP_API_URL),
37-
// []
38-
// );
3935

4036
const BASE_URL = useMemo(
4137
() => normalizeApiBaseUrl(import.meta.env.VITE_REACT_APP_API_URL),
@@ -76,16 +72,6 @@ const BASE_URL = useMemo(
7672
}, [selectedOS, searchPerformed]);
7773

7874

79-
// const fetchOSList = () => {
80-
// console.log(`${import.meta.env.VITE_REACT_APP_API_URL}/getSupportedDistros`)
81-
// fetch(`${import.meta.env.VITE_REACT_APP_API_URL}/getSupportedDistros`)
82-
// .then((response) => response.json())
83-
// .then((data) => {
84-
// console.log(data);
85-
// setOsList(data);
86-
// });
87-
// };
88-
8975

9076

9177
const generateSearchBitFlag = () => {
@@ -108,11 +94,7 @@ const BASE_URL = useMemo(
10894
const searchTerm = params ? params.value : value;
10995

11096

111-
// const apiUrl = `${import.meta.env.VITE_REACT_APP_API_URL}/searchPackages?search_term=${value}&exact_match=${exact}&search_bit_flag=${searchBitFlag}${osFilters}`;
112-
113-
// console.log("Fetch URL:", apiUrl);
11497

115-
11698

11799
const encodedSearchTerm = encodeURIComponent(searchTerm);
118100
const apiUrl = `${BASE_URL}/searchPackages?search_term=${encodedSearchTerm}&exact_match=${isExact}&search_bit_flag=${searchBitFlag}&page_number=${page}&search_description=${isSearchDescription}&limit=${limit}`;

react-frontend/src/main.jsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
// import React from 'react'
2-
// import ReactDOM from 'react-dom/client'
3-
// import App from './App'
4-
5-
// const root = ReactDOM.createRoot(document.getElementById('root'))
6-
// root.render(
7-
// <React.StrictMode>
8-
// <App />
9-
// </React.StrictMode>
10-
// )
11-
12-
// If you want to start measuring performance in your app, pass a function
13-
// to log results (for example: reportWebVitals(console.log))
14-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
151

162
import React from 'react'
173
import ReactDOM from 'react-dom/client'

react-frontend/vite.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ export default defineConfig({
66
plugins: [react()],
77
server: {
88
port: 3000,
9-
// proxy: {
10-
// '/api': 'http://localhost:5000'
11-
// }
129
proxy: {
1310
'/sdt': 'http://localhost:5000'
1411
}

0 commit comments

Comments
 (0)