Skip to content

Commit

Permalink
fix: 에러수정
Browse files Browse the repository at this point in the history
  • Loading branch information
dongbin420 committed Jul 10, 2023
1 parent ed18206 commit 05623a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './App.css';
import { Outlet } from 'react-router-dom';
import Main from './pages/MainPage/Main';
import MovieGallery from './pages/UI/MovieGallery';
import Header from './pages/UI/Header';
// import Main from './pages/MainPage/Main';
// import MovieGallery from './pages/UI/MovieGallery';
// import Header from './pages/UI/Header';

function App() {
return (
Expand Down
2 changes: 1 addition & 1 deletion client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<RouterProvider router={router} />
</Provider>
</React.StrictMode>
);
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ import { MdOutlineThumbUp, MdOutlineThumbDown } from 'react-icons/md';
import { ReviewProps } from '../Review';

const ReviewBottom = ({ review }: ReviewProps) => {
const [isLogin, setIsLogin] = useState<boolean>(false); // 나중에 실제 로그인 상태 이용
// const [isLogin, setIsLogin] = useState<boolean>(false); // 나중에 실제 로그인 상태 이용
const [likes, setLikes] = useState<number>(review.like); // 리다이렉트를 사용하면, 상태를 이렇게 수동으로 변경하지 않아도 될 수도..

const handleLike: () => void = () => {
if (!isLogin) {
alert('로그인을 해주세요');
} else {
setLikes((prev) => prev + 1);
}
setLikes((prev) => prev + 1);
};
return (
<div className="flex justify-between">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const ModalForm = ({ movieId, review }: ModalFormProps) => {
const [score, setScore] = useState<number>(review ? review.score : 0);

console.log(selectedTags);
console.log(movieId);

const addTagHandler = (tag: string) => {
const updatedTags = [...selectedTags];
Expand Down

0 comments on commit 05623a9

Please sign in to comment.