Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dependency bug #6

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
38 changes: 7 additions & 31 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ In the project directory, you can run:
### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.
The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Expand All @@ -31,40 +31,16 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**
**Note: this is a one-way operation. Once you `eject`, you cant go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
8 changes: 5 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "my-app",
"name": "temp",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/react": "^18.3.11",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.115",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-router-dom": "^5.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.27.0",
"react-scripts": "5.0.1",
"typescript": "^5.6.3",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
11 changes: 5 additions & 6 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// src/App.tsx
import React from 'react';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import Home from './Home';
import UploadPage from './UploadPage';
import UpdatePage from './UpdatePage';
import RatingPage from './RatingPage';
import DownloadPage from './DownloadPage';
import Home from './pages/home';
import UploadPage from './pages/upload';
import UpdatePage from './pages/update';
import RatingPage from './pages/rating';
import DownloadPage from './pages/download';

const App: React.FC = () => {
return (
Expand Down
1 change: 0 additions & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// src/index.tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
Expand Down
25 changes: 12 additions & 13 deletions frontend/src/DownloadPage.tsx → frontend/src/pages/download.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// src/DownloadPage.tsx
import React from 'react';

const DownloadPage: React.FC = () => {
return (
<div>
<h1>Download Page</h1>
<p>This is the download page. Download files here.</p>
</div>
);
};

export default DownloadPage;
import React from 'react';

const DownloadPage: React.FC = () => {
return (
<div>
<h1>Download Page</h1>
<p>This is the download page. Download files here.</p>
</div>
);
};

export default DownloadPage;
146 changes: 73 additions & 73 deletions frontend/src/Home.css → frontend/src/pages/home.css
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
/* src/Home.css */
.home-container {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
background-color: #f4f4f4;
}
.hero {
background-color: #282c34;
color: white;
padding: 50px;
margin-bottom: 30px;
border-radius: 10px;
}
.hero h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
.hero button {
padding: 10px 20px;
background-color: #61dafb;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1rem;
}
.hero button:hover {
background-color: #21a1f1;
}
.nav-links ul {
list-style-type: none;
padding: 0;
margin: 20px 0;
}
.nav-links li {
display: inline;
margin: 0 15px;
}
.nav-links a {
text-decoration: none;
color: blue;
font-weight: bold;
}
.nav-links a:hover {
text-decoration: underline;
}
.features {
margin-top: 20px;
}
.features ul {
list-style-type: none;
padding: 0;
}
.features li {
margin: 10px 0;
font-size: 1.2rem;
}
.footer {
margin-top: 30px;
color: #777;
}
/* src/Home.css */
.home-container {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
background-color: #f4f4f4;
}

.hero {
background-color: #282c34;
color: white;
padding: 50px;
margin-bottom: 30px;
border-radius: 10px;
}

.hero h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}

.hero button {
padding: 10px 20px;
background-color: #61dafb;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1rem;
}

.hero button:hover {
background-color: #21a1f1;
}

.nav-links ul {
list-style-type: none;
padding: 0;
margin: 20px 0;
}

.nav-links li {
display: inline;
margin: 0 15px;
}

.nav-links a {
text-decoration: none;
color: blue;
font-weight: bold;
}

.nav-links a:hover {
text-decoration: underline;
}

.features {
margin-top: 20px;
}

.features ul {
list-style-type: none;
padding: 0;
}

.features li {
margin: 10px 0;
font-size: 1.2rem;
}

.footer {
margin-top: 30px;
color: #777;
}
67 changes: 33 additions & 34 deletions frontend/src/Home.tsx → frontend/src/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
// src/Home.tsx
import React from 'react';
import { Link } from 'react-router-dom';
import './Home.css'; // Optional: For styling

const Home: React.FC = () => {
return (
<div className="home-container">
<header className="hero">
<h1>Cool Website</h1>
<p>ECE@Purdue's course in Software Engineering, offered by the inimitable Prof. James C. Davis and his colorful cast of quirky teaching assistants.</p>
</header>

<nav className="nav-links">
<ul>
<li><Link to="/upload">Upload</Link></li>
<li><Link to="/update">Update</Link></li>
<li><Link to="/rating">Rating</Link></li>
<li><Link to="/download">Download</Link></li>
</ul>
</nav>

<section className="Our goals">

</section>

<footer className="footer">
<p>© ECE461 group21's Website. All rights reserved.</p>
</footer>
</div>
);
};

export default Home;
import React from 'react';
import { Link } from 'react-router-dom';
import './home.css'; // Optional: For styling

const Home: React.FC = () => {
return (
<div className="home-container">
<header className="hero">
<h1>Cool Website</h1>
<p>ECE@Purdue's course in Software Engineering, offered by the inimitable Prof. James C. Davis and his colorful cast of quirky teaching assistants.</p>
</header>

<nav className="nav-links">
<ul>
<li><Link to="/upload">Upload</Link></li>
<li><Link to="/update">Update</Link></li>
<li><Link to="/rating">Rating</Link></li>
<li><Link to="/download">Download</Link></li>
</ul>
</nav>

<section className="Our goals">

</section>

<footer className="footer">
<p>© ECE461 group21's Website. All rights reserved.</p>
</footer>
</div>
);
};

export default Home;
Loading
Loading