Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juncevich committed Aug 12, 2023
1 parent 143b9ff commit 46632db
Show file tree
Hide file tree
Showing 8 changed files with 534 additions and 238 deletions.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"antd": "^5.8.2",
"axios": "^1.4.0",
"caniuse-lite": "^1.0.30001519",
"core-js": "^3.32.0",
"craco": "^0.0.3",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import './App.css';
import MainTab from './components/mainTab/MainTab';
import MainPage from './pages/MainPage';

function App() {
return (
<div className="App">
<MainTab/>
<MainPage/>
</div>


Expand Down
6 changes: 6 additions & 0 deletions frontend/src/api/RelayService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import axios from 'axios';
import http from './http-common';

// const getAll = () => {
// return http.get<Array<ITutorialData>>("/tutorials");
// };
8 changes: 8 additions & 0 deletions frontend/src/api/http-common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import axios from "axios";

export default axios.create({
baseURL: "http://localhost:8080/api",
headers: {
"Content-type": "application/json"
}
});
637 changes: 424 additions & 213 deletions frontend/src/components/mainTab/MainTab.tsx

Large diffs are not rendered by default.

81 changes: 59 additions & 22 deletions frontend/src/components/relay/RelayCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ import {CloseCircleFilled, EditOutlined, EllipsisOutlined, SettingOutlined} from
import Meta from 'antd/es/card/Meta';
import './RelayCard.css';

class RelayCard extends React.Component<any, any> {
function RelayCard() {

render() {
const card = <Card
// style={{width: "auto"}}
cover={
<img
alt="example"
src="http://www.status-scb.ru/upload/iblock/458/458aa8a30c03af897511a2d8c00cdc74.png"
/>
}
actions={[
<SettingOutlined key="setting"/>,
<EditOutlined key="edit"/>,
<EllipsisOutlined key="ellipsis"/>,
]}
>
return (
<>
<span>
<div className="relay-card-container">
<Card
// style={{width: "auto"}}
cover={
<img
alt="example"
src="http://www.status-scb.ru/upload/iblock/458/458aa8a30c03af897511a2d8c00cdc74.png"
/>
}
actions={[
<SettingOutlined key="setting"/>,
<EditOutlined key="edit"/>,
<EllipsisOutlined key="ellipsis"/>,
]}
>
<Meta
avatar={<CloseCircleFilled style={{color: '#08c'}}/>}
title="НМШ-400"
Expand All @@ -32,14 +35,48 @@ class RelayCard extends React.Component<any, any> {
</tr>
</table>
</Card>;
return (
<span>
<div className="relay-card-container">
{card}
</div>
</span>
);
}
</>
);
}

// class RelayCard extends React.Component<any, any> {
//
// render() {
// const card = <Card
// // style={{width: "auto"}}
// cover={
// <img
// alt="example"
// src="http://www.status-scb.ru/upload/iblock/458/458aa8a30c03af897511a2d8c00cdc74.png"
// />
// }
// actions={[
// <SettingOutlined key="setting"/>,
// <EditOutlined key="edit"/>,
// <EllipsisOutlined key="ellipsis"/>,
// ]}
// >
// <Meta
// avatar={<CloseCircleFilled style={{color: '#08c'}}/>}
// title="НМШ-400"
// />
// <table>
// <tr>
// <td>Дата проверки</td>
// <td>01.02.2003</td>
// </tr>
// </table>
// </Card>;
// return (
// <span>
// <div className="relay-card-container">
// {card}
// </div>
// </span>
// );
// }
// }

export default RelayCard;
10 changes: 10 additions & 0 deletions frontend/src/pages/MainPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import MainTab from '../components/mainTab/MainTab';
import React from 'react';

function MainPage() {
return (
<MainTab/>
);
}

export default MainPage;
25 changes: 24 additions & 1 deletion frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3491,6 +3491,15 @@ axe-core@^4.4.3:
resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.5.0.tgz"
integrity sha512-4+rr8eQ7+XXS5nZrKcMO/AikHL0hVqy+lHWAnE3xdHl+aguag8SOQ6eEqLexwLNWgXIMfunGuD3ON1/6Kyet0A==

axios@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f"
integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axobject-query@^2.2.0:
version "2.2.0"
resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz"
Expand Down Expand Up @@ -5928,7 +5937,7 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0:
follow-redirects@^1.0.0, follow-redirects@^1.15.0:
version "1.15.2"
resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==
Expand Down Expand Up @@ -5973,6 +5982,15 @@ form-data@^3.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"

forwarded@0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz"
Expand Down Expand Up @@ -9674,6 +9692,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

prr@~1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz"
Expand Down

0 comments on commit 46632db

Please sign in to comment.