Skip to content

Commit

Permalink
๐Ÿ› ์นดํ…Œ๊ณ ๋ฆฌ ์ง€์ •์„ ์•ˆํ–ˆ์„๋•Œ, api ํ†ต์‹  ๋ง‰์Œ
Browse files Browse the repository at this point in the history
- ์ฒ˜์Œ ํŽ˜์ด์ง€ ๋กœ๋”ฉ์‹œ, ์นดํ…Œ๊ณ ๋ฆฌ ์˜์—ญ์— ์•„๋ฌด๊ฒƒ๋„ ์—†์œผ๋ฉด, ์„ ํƒ์„ ์•ˆํ•จ, ์—ฌ๊ธฐ์„œ Favoriate์˜์—ญ์— ์žˆ๋Š” ๊ฒฝ์šฐ๊ฐ€ ์กด์žฌํ•จ
  - selectedCategory ์ฒดํฌํ•˜์—ฌ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ์„ ํƒ ์œ ๋ฌด๋ฅผ ํŒ๋‹จํ•˜์—ฌ api ์š”์ฒญ ํŒ๋‹จํ•˜๋„๋ก ์„ค์ •
- diplayNone ์˜คํƒˆ์ž  ์ˆ˜์ • => displayNone
  • Loading branch information
yjkwon07 committed Oct 21, 2021
1 parent 03d999d commit 8ad547b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/pages/Home/LinkDropZone/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ function LinkDropZone() {
openToast({ type: 'error', message: '์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•ด์ฃผ์„ธ์š”.' })
return
}
if (!selectedCategory.id) {
openToast({ type: 'error', message: '๋งํฌ๋ฅผ ์ €์žฅํ•  ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜ ์„ ํƒํ•ด์ฃผ์„ธ์š”.' })
return
}
const path = listData.reduce((prev, data) => prev.concat(data.path), [])
await dispatch(linkCreateThunk({ categoryId: selectedCategory.id, path }))
clearDragData()
Expand All @@ -51,7 +55,7 @@ function LinkDropZone() {
return (
<div
className={clsx(classes.coverBackground, {
[classes.diplayNone]: !open,
[classes.displayNone]: !open,
})}
onDrop={handleDropOnCardArea}
onDragOver={handleDragOverOnCardArea}
Expand Down
2 changes: 1 addition & 1 deletion src/main/pages/Home/LinkDropZone/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useStyles = makeStyles((theme) => ({
backgroundColor: 'rgba(53, 142, 255, 0.15)',
opacity: 1,
},
diplayNone: {
displayNone: {
display: 'none',
},
addLinkIcon: {
Expand Down

0 comments on commit 8ad547b

Please sign in to comment.