Skip to content

Commit

Permalink
0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrJO1N committed Jul 18, 2024
1 parent 33c6c03 commit fc2155c
Show file tree
Hide file tree
Showing 34 changed files with 368 additions and 191 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
- complete server dev
- complete general environment (bat,bash)
- complete frontend environment

## 0.8.0

- complete frontend
87 changes: 83 additions & 4 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "3205.client",
"version": "0.4.0",
"version": "0.8.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
Expand All @@ -10,6 +10,9 @@
"@types/node": "^16.18.102",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"axios": "^1.7.2",
"joi": "^17.13.3",
"joi-browser": "^13.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
Expand Down
Binary file removed client/public/favicon.ico
Binary file not shown.
30 changes: 0 additions & 30 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file removed client/public/logo192.png
Binary file not shown.
Binary file removed client/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions client/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions client/public/robots.txt

This file was deleted.

14 changes: 14 additions & 0 deletions client/src/API/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import axios from "axios";
export async function getUsers(email?: string, num?: string) {
let urlQuery = [];

if (email) urlQuery.push(`email=${email}`);
if (num) urlQuery.push(`number=${num}`);

const url = "http://localhost/api/users/?" + urlQuery.join("&");

return await axios
.get(url)
.catch((error) => console.error(error.message))
.then((res) => res?.data);
}
38 changes: 0 additions & 38 deletions client/src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +0,0 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
9 changes: 0 additions & 9 deletions client/src/App.test.tsx

This file was deleted.

33 changes: 16 additions & 17 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import React, { useEffect, useState } from "react";
import "./App.css";
import { getUsers } from "./API/main";
import { UI } from "./components/UI/main";
import FindUserForm from "./components/FindUserForm";
import UserList from "./components/UserList";
import { UserI } from "./types";

function App() {
const [userList, setUserList] = useState<UserI[]>([]);

useEffect(() => {
getUsers().then((users) => setUserList(users));
}, []);

return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<FindUserForm setUserList={setUserList} />
<hr style={{ padding: "0 0px", margin: "10px 0" }} />
<UserList users={userList} />
</div>
);
}
Expand Down
Loading

0 comments on commit fc2155c

Please sign in to comment.