feat: 업로드 페이지 저작권자 검색, 정산 비율 배열 추가#98
Open
KimSH39 wants to merge 2 commits intoUXMUnderGraduate:mainfrom
Open
Conversation
MinsuKim21
reviewed
Oct 14, 2022
Comment on lines
+474
to
569
| const [state, setState] = React.useState({ | ||
| bottom: false, | ||
| }); | ||
|
|
||
| const anchor = 'bottom'; | ||
|
|
||
| const toggleDrawer = (anchor, open) => (event) => { | ||
| handleOnClick(); | ||
|
|
||
| if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) { | ||
| return; | ||
| } | ||
| setState({ ...state, [anchor]: open }); | ||
| }; | ||
|
|
||
| // const Navigate = useNavigate(); | ||
| const [holder, setholder] = useState([]); | ||
| const holderlist = (item) => { | ||
| setholder((holder) => { | ||
| console.log(holder); | ||
| return [...holder, item]; | ||
| }); | ||
| }; | ||
| const list = (anchor) => ( | ||
| <Box | ||
| style={{ fontColor: 'red' }} | ||
| sx={{ width: anchor === 'top' || anchor === 'bottom' ? 'auto' : 250 }} | ||
| role="presentation" | ||
| onClick={toggleDrawer(anchor, false)} | ||
| onKeyDown={toggleDrawer(anchor, false)} | ||
| > | ||
| <List> | ||
| {data.map((item) => ( | ||
| <ListItem style={{ color: 'Black' }} key={item.id}> | ||
| <ListItemButton onClick={() => holderlist(item.id)}> | ||
| <ListItemText primary={item.nickname} /> | ||
| </ListItemButton> | ||
| </ListItem> | ||
| ))} | ||
| </List> | ||
| <Divider /> | ||
| </Box> | ||
| ); | ||
|
|
||
| const [data, setData] = useState([]); | ||
|
|
||
| const token = localStorage.getItem('jwtToken'); | ||
|
|
||
| const [search, setSearch] = useState(''); | ||
|
|
||
| const [copyright, setcopyright] = useState([]); | ||
|
|
||
| const copyrightlist = (e) => { | ||
| setcopyright((copyright) => { | ||
| return [...copyright, e.target.value]; | ||
| }); | ||
| }; | ||
|
|
||
| const handleOnKeyPress = (e) => { | ||
| if (e.key == ' ') { | ||
| copyrightlist(e); | ||
| } | ||
| }; | ||
|
|
||
| const onChangeSearch = (e) => { | ||
| setSearch(e.target.value); | ||
| toggleDrawer(anchor, true); | ||
| }; | ||
|
|
||
| const handleOnClick = async () => { | ||
| // console.log(token); | ||
|
|
||
| await axios | ||
| .get(`http://${process.env.REACT_APP_BACKEND_URL}/api/v1/user?search=${search}`, { | ||
| headers: { | ||
| authorization: token, | ||
| }, | ||
| params: { | ||
| holder, | ||
| }, | ||
| }) | ||
| .then((res) => { | ||
| setData(res.data.data); | ||
| console.log(data); | ||
| console.log(search); | ||
| console.log(holder); | ||
| console.log(copyright); | ||
| }) | ||
| .catch((err) => { | ||
| console.log(err); | ||
| }); | ||
| }; | ||
|
|
||
| return ( | ||
| <DetailDiv> | ||
| {props.countComposerList && |
Comment on lines
+611
to
+662
| const [state, setState] = React.useState({ | ||
| bottom: false, | ||
| }); | ||
|
|
||
| const anchor = 'bottom'; | ||
|
|
||
| const toggleDrawer = (anchor, open) => (event) => { | ||
| handleOnClick(); | ||
| if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) { | ||
| return; | ||
| } | ||
| setState({ ...state, [anchor]: open }); | ||
| }; | ||
| const [holder2, setholder2] = useState([]); | ||
| const holderlist2 = (item) => { | ||
| setholder2((holder2) => { | ||
| console.log(holder2); | ||
| return [...holder2, item]; | ||
| }); | ||
| }; | ||
|
|
||
| const list = (anchor) => ( | ||
| <Box | ||
| sx={{ width: anchor === 'top' || anchor === 'bottom' ? 'auto' : 250 }} | ||
| role="presentation" | ||
| onClick={toggleDrawer(anchor, false)} | ||
| onKeyDown={toggleDrawer(anchor, false)} | ||
| > | ||
| <List> | ||
| {data.map((item) => ( | ||
| <ListItem style={{ color: 'Black' }} key={item.id}> | ||
| <ListItemButton onClick={() => holderlist2(item.id)}> | ||
| <ListItemText primary={item.nickname}></ListItemText> | ||
| </ListItemButton> | ||
| </ListItem> | ||
| ))} | ||
| </List> | ||
| <Divider /> | ||
| </Box> | ||
| ); | ||
|
|
||
| const [data, setData] = useState([]); | ||
|
|
||
| const token = localStorage.getItem('jwtToken'); | ||
|
|
||
| const [search, setSearch] = useState(''); | ||
| const [copyright2, setcopyright2] = useState([]); | ||
|
|
||
| const copyrightlist2 = (e) => { | ||
| setcopyright2((copyright2) => { | ||
| return [...copyright2, e.target.value]; | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
주요 변경 사항
코드 설명
중요도
기타 특이사항