Skip to content
Open
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
5 changes: 5 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@mui/material": "^5.2.5",
"@mui/styled-engine": "^5.1.1",
"@mui/x-data-grid": "^5.0.1",
"@reduxjs/toolkit": "^1.7.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
Expand All @@ -21,9 +22,13 @@
"http-proxy-middleware": "^2.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.6",
"react-router": "^6.2.1",
"react-router-dom": "^6.2.1",
"react-scripts": "4.0.3",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.1",
"web-vitals": "^1.0.1"
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as React from 'react'
import {useState} from 'react';
import Page from './Page'
import Page from './component/HomePage/Page'
import LoadingPage from './component/Login/Loading';
import { chcekLoginStatusAsync } from './component/Login/Login';

export default function App(){
const [loginStatus,setLoginStatus]=useState();
if(loginStatus===undefined){
Expand Down
2 changes: 2 additions & 0 deletions client/src/component/Drawer/state/ProjectDrawerActions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const OPEN_PROJECT_DRAWER='OPEN_PROJECT_DRAWER'
export const CLOSE_PROJECT_DRAWER='CLOSE_PROJECT_DRAWER'
13 changes: 13 additions & 0 deletions client/src/component/Drawer/state/ProjectDrawerSlice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {OPEN_PROJECT_DRAWER,CLOSE_PROJECT_DRAWER} from "./ProjectDrawerActions";

const projectDrawerOpenInitialState='close';
export const projectDrawerReducer=(state=projectDrawerOpenInitialState,action)=>{
switch (action.type){
case OPEN_PROJECT_DRAWER:
return 'open'
case CLOSE_PROJECT_DRAWER:
return 'close'
default:
return state
}
}
12 changes: 6 additions & 6 deletions client/src/Page.js → client/src/component/HomePage/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import * as React from 'react';
import Box from '@mui/material/Box';
import CssBaseline from '@mui/material/CssBaseline';
import { CircularProgress,Stack,Typography } from '@mui/material';
import DicomTable from "./component/Table/DicomTable";
import UpDownloadToolbar from "./component/Toolbar/UpDownloadToolbar";
import { DrawerHeader } from './component/Drawer/ProjectDrawer';
import ProjectDrawer from './component/Drawer/ProjectDrawer'
import BaseAppBar from './component/AppBar/BaseAppBar';
import LoadingPage from './component/Login/Loading';
import DicomTable from "../Table/DicomTable";
import UpDownloadToolbar from "../Toolbar/UpDownloadToolbar";
import { DrawerHeader } from '../Drawer/ProjectDrawer';
import ProjectDrawer from '../Drawer/ProjectDrawer'
import BaseAppBar from '../AppBar/BaseAppBar';
import LoadingPage from '../Login/Loading';
import axios from 'axios';
axios.defaults.maxRedirects=0;
export default function Page() {
Expand Down
10 changes: 7 additions & 3 deletions client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux'
import store from './store'

ReactDOM.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
<Provider store={store}>
<BrowserRouter>
<App />
</BrowserRouter>
</Provider>
</React.StrictMode>,
document.getElementById('root')
);
Expand Down
3 changes: 3 additions & 0 deletions client/src/reducer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { combineReducers } from 'redux';

export default combineReducers({ });
15 changes: 15 additions & 0 deletions client/src/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* reducer는 store에 들어갈 state와 state를 바꿀 함수를 정의하는 곳입니다.
* 기본적으로 순수함수로 코딩하고, 불변성을 지켜야 합니다.
*
*/
import { createStore, applyMiddleware } from 'redux'
import thunkMiddleware from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import reducer from './reducer'

const composedEnhancer = composeWithDevTools(applyMiddleware(thunkMiddleware))

// The store now has the ability to accept thunk functions in `dispatch`
const store = createStore(reducer, composedEnhancer)
export default store
71 changes: 70 additions & 1 deletion client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,13 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.15.4":
version "7.17.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.0.tgz#b8d142fc0f7664fb3d9b5833fd40dcbab89276c0"
integrity sha512-etcO/ohMNaNA2UBdaXBBSX/3aEzFMRrVfaPv8Ptc0k+cWpWW0QFiGZ2XnVqQZI1Cf734LbPGmqBKWESfW4x/dQ==
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.7.6":
version "7.16.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa"
Expand Down Expand Up @@ -1617,6 +1624,16 @@
resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz"
integrity sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ==

"@reduxjs/toolkit@^1.7.2":
version "1.7.2"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.7.2.tgz#b428aaef92582379464f9de698dbb71957eafb02"
integrity sha512-wwr3//Ar8ZhM9bS58O+HCIaMlR4Y6SNHfuszz9hKnQuFIKvwaL3Kmjo6fpDKUOjo4Lv54Yi299ed8rofCJ/Vjw==
dependencies:
immer "^9.0.7"
redux "^4.1.2"
redux-thunk "^2.4.1"
reselect "^4.1.5"

"@rollup/plugin-node-resolve@^7.1.1":
version "7.1.3"
resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz"
Expand Down Expand Up @@ -1890,6 +1907,14 @@
dependencies:
"@types/node" "*"

"@types/hoist-non-react-statics@^3.3.0":
version "3.3.1"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==
dependencies:
"@types/react" "*"
hoist-non-react-statics "^3.3.0"

"@types/html-minifier-terser@^5.0.0":
version "5.1.2"
resolved "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz"
Expand Down Expand Up @@ -1981,6 +2006,16 @@
dependencies:
"@types/react" "*"

"@types/react-redux@^7.1.20":
version "7.1.22"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.22.tgz#0eab76a37ef477cc4b53665aeaf29cb60631b72a"
integrity sha512-GxIA1kM7ClU73I6wg9IRTVwSO9GS+SAKZKe0Enj+82HMU6aoESFU2HNAdNi3+J53IaOHPiUfT3kSG4L828joDQ==
dependencies:
"@types/hoist-non-react-statics" "^3.3.0"
"@types/react" "*"
hoist-non-react-statics "^3.3.0"
redux "^4.0.0"

"@types/react-transition-group@^4.4.4":
version "4.4.4"
resolved "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz"
Expand Down Expand Up @@ -5734,7 +5769,7 @@ hmac-drbg@^1.0.1:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1"

hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2:
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
Expand Down Expand Up @@ -5960,6 +5995,11 @@ immer@8.0.1:
resolved "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz"
integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==

immer@^9.0.7:
version "9.0.12"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20"
integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA==

import-cwd@^2.0.0:
version "2.1.0"
resolved "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz"
Expand Down Expand Up @@ -9368,6 +9408,18 @@ react-is@^17.0.1, react-is@^17.0.2:
resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-redux@^7.2.6:
version "7.2.6"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.6.tgz#49633a24fe552b5f9caf58feb8a138936ddfe9aa"
integrity sha512-10RPdsz0UUrRL1NZE0ejTkucnclYSgXp5q+tB5SWx2qeG2ZJQJyymgAhwKy73yiL/13btfB6fPr+rgbMAaZIAQ==
dependencies:
"@babel/runtime" "^7.15.4"
"@types/react-redux" "^7.1.20"
hoist-non-react-statics "^3.3.2"
loose-envify "^1.4.0"
prop-types "^15.7.2"
react-is "^17.0.2"

react-refresh@^0.8.3:
version "0.8.3"
resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz"
Expand Down Expand Up @@ -9544,6 +9596,23 @@ redent@^3.0.0:
indent-string "^4.0.0"
strip-indent "^3.0.0"

redux-devtools-extension@^2.13.9:
version "2.13.9"
resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.9.tgz#6b764e8028b507adcb75a1cae790f71e6be08ae7"
integrity sha512-cNJ8Q/EtjhQaZ71c8I9+BPySIBVEKssbPpskBfsXqb8HJ002A3KRVHfeRzwRo6mGPqsm7XuHTqNSNeS1Khig0A==

redux-thunk@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.1.tgz#0dd8042cf47868f4b29699941de03c9301a75714"
integrity sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==

redux@^4.0.0, redux@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.2.tgz#140f35426d99bb4729af760afcf79eaaac407104"
integrity sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==
dependencies:
"@babel/runtime" "^7.9.2"

regenerate-unicode-properties@^9.0.0:
version "9.0.0"
resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz"
Expand Down