Skip to content
Merged
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
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/src/assets/insidemovie_white.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>InsideMovie</title>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/api/boxofficeApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios from "axios";
import axios from "./axiosInstance";

export const boxofficeApi = () => {
// 주간 박스오피스 조회
Expand Down
10 changes: 10 additions & 0 deletions src/assets/defaultImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 13 additions & 6 deletions src/components/BoxOfficeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import disgustIcon from "@assets/character/disgust_icon.png";
import bingbongIcon from "@assets/character/bingbong_icon.png";
import StarFull from "@assets/star_full.svg?react";
import TMDB from "@assets/TMDB.svg?react";
import DefaultImage from "@assets/defaultImage.svg?react";
import Down from "@assets/down.svg?react";
import Up from "@assets/up.svg?react";
import { useNavigate } from "react-router-dom";
Expand Down Expand Up @@ -52,7 +53,9 @@ const BoxOfficeItem: React.FC<BoxOfficeItemProps> = ({
return (
<div
className="flex gap-3 mb-2"
onClick={() => navigate(`/movies/detail/${movieId}`)}
onClick={() =>
movieId !== null ? navigate(`/movies/detail/${movieId}`) : null
}
>
<div className="w-[80px] text-white font-bold text-end relative">
<p className="text-4xl">{rank}</p>
Expand All @@ -78,11 +81,15 @@ const BoxOfficeItem: React.FC<BoxOfficeItemProps> = ({
</div>
</div>
<div className="flex w-full rounded-3xl bg-box_bg_white items-center cursor-pointer transform transition-all duration-200 hover:bg-box_bg_white/30">
<img
src={posterPath}
alt={title}
className="w-auto h-32 rounded-l-3xl object-cover me-4"
/>
{posterPath ? (
<img
src={posterPath}
alt={title}
className="w-auto h-32 rounded-l-3xl object-cover me-4"
/>
) : (
<DefaultImage className="w-auto h-32 rounded-l-3xl object-cover me-4" />
)}

<div className="flex flex-col gap-2 flex-1 text-white">
<div className="text-lg font-semibold">{title}</div>
Expand Down
22 changes: 11 additions & 11 deletions src/components/ReviewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import angryIcon from "@assets/character/angry_icon.png";
import fearIcon from "@assets/character/fear_icon.png";
import disgustIcon from "@assets/character/disgust_icon.png";
import bingbongIcon from "@assets/character/bingbong_icon.png";
import BingbongProfile from "@assets/profile/bingbong_profile.png";
import bingbongProfile from "@assets/profile/bingbong_profile.png";
import joyProfile from "@assets/profile/joy_profile.png";
import angryProfile from "@assets/profile/angry_profile.png";
import sadnessProfile from "@assets/profile/sad_profile.png";
Expand Down Expand Up @@ -57,6 +57,15 @@ const emotionMap = {
none: bingbongIcon,
};

const emotionProfileMap: Record<string, string> = {
joy: joyProfile,
anger: angryProfile,
sadness: sadnessProfile,
fear: fearProfile,
disgust: disgustProfile,
none: bingbongProfile,
};

const ReviewItem: React.FC<ReviewItemProps> = ({
reviewId,
content,
Expand All @@ -65,7 +74,6 @@ const ReviewItem: React.FC<ReviewItemProps> = ({
createdAt,
likeCount,
myReview = false,
modify = false,
myLike = false,
nickname,
memberId,
Expand Down Expand Up @@ -93,14 +101,6 @@ const ReviewItem: React.FC<ReviewItemProps> = ({
"INAPPROPRIATE_LANGUAGE",
);

const emotionProfileMap: Record<string, string> = {
joy: joyProfile,
anger: angryProfile,
sadness: sadnessProfile,
fear: fearProfile,
disgust: disgustProfile,
};

// possible reasons
const reportReasons = [
{ value: "INAPPROPRIATE_LANGUAGE", label: "부적절한 언어 사용" },
Expand Down Expand Up @@ -153,7 +153,7 @@ const ReviewItem: React.FC<ReviewItemProps> = ({
src={
profile
? emotionProfileMap[profile?.toLowerCase()]
: BingbongProfile
: bingbongProfile
}
alt="Profile"
className="h-8 w-8 rounded-full "
Expand Down
8 changes: 4 additions & 4 deletions src/components/home/MatchSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ const MatchSection: React.FC<MatchSectionProps> = ({ className = "" }) => {
금주의 영화 대결
<ArrowRight />
</h1>
<div className="flex flex-col md:flex-row w-full justify-between gap-10">
<div>
<div className="flex flex-col w-full justify-center gap-10">
<div className="flex flex-col items-center">
{movieList.length === 0 ? (
<div className="flex justify-center items-center gap-10 mt-10 text-center text-gray-400 py-12">
아직 투표된 내용이 없습니다.
</div>
) : (
<div className="flex flex-col md:flex-row justify-between items-center">
<div className="flex flex-col md:flex-row justify-center items-center">
{movieList.map((poster, idx) => (
<React.Fragment key={idx}>
<MovieItem
Expand All @@ -103,7 +103,7 @@ const MatchSection: React.FC<MatchSectionProps> = ({ className = "" }) => {
</div>
)}
<Button
className="w-full"
className="w-1/2 mt-12"
text="투표하러 가기"
textColor="black"
buttonColor="white"
Expand Down
7 changes: 6 additions & 1 deletion src/pages/admin/components/AppNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import DashboardRoundedIcon from "@mui/icons-material/DashboardRounded";
import SideMenuMobile from "./SideMenuMobile";
import MenuButton from "./MenuButton";
import ColorModeIconDropdown from "../shared-theme/ColorModeIconDropdown";
import logo from "../../../assets/insidemovie_white_long.svg";
import logoLight from "../../../assets/insidemovie_white_long.svg";
import logoDark from "../../../assets/insidemovie_dark_long.svg";
import { useColorScheme } from "@mui/material/styles";

const Toolbar = styled(MuiToolbar)({
width: "100%",
Expand All @@ -29,6 +31,9 @@ const Toolbar = styled(MuiToolbar)({
});

export default function AppNavbar() {
const { mode, systemMode } = useColorScheme();
const appliedMode = mode === "system" ? systemMode : mode;
const logo = appliedMode === "light" ? logoDark : logoLight;
const [open, setOpen] = React.useState(false);

const toggleDrawer = (newOpen: boolean) => () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/admin/components/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function SideMenu() {
<Drawer
variant="permanent"
sx={{
display: { xs: "block", md: "block" },
display: { xs: "none", md: "block" },
[`& .${drawerClasses.paper}`]: {
backgroundColor: "background.paper",
},
Expand Down
20 changes: 11 additions & 9 deletions src/pages/user/ReviewWrite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,12 @@ const ReviewWrite: React.FC = () => {

return (
<div className="flex justify-center">
<div className="max-w-screen-lg w-full">
<div className="max-w-screen-lg w-full mx-5 mb-36">
<div className="flex flex-col">
<div className="flex justify-between items-center pt-20 py-36 pb-6">
<h1 className="text-white text-3xl font-semibold text-left">
{isEditMode ? "리뷰 수정" : "리뷰 작성"}
</h1>
<Button
text={isEditMode ? "수정하기" : "등록하기"}
textColor="white"
buttonColor="default"
onClick={handleSubmit}
className="px-12"
/>
</div>
<div className="flex gap-10 text-white">
<img
Expand Down Expand Up @@ -223,10 +216,19 @@ const ReviewWrite: React.FC = () => {
</div>
<textarea
placeholder="리뷰 내용을 입력하세요"
className="bg-box_bg_white h-[400px] text-white text-xs w-full p-4 outline-none focus:ring-1 focus:ring-movie_sub rounded-3xl"
className="bg-box_bg_white h-[400px] text-white text-sm w-full p-4 outline-none focus:ring-1 focus:ring-movie_sub rounded-3xl"
value={content}
onChange={(e) => setContent(e.target.value)}
/>
<div className="flex items-center justify-end gap-3 my-6 flex-wrap">
<Button
text={isEditMode ? "수정하기" : "등록하기"}
textColor="white"
buttonColor="default"
onClick={handleSubmit}
className="px-16"
/>
</div>
</div>
</div>
<ConfirmDialog
Expand Down
2 changes: 1 addition & 1 deletion src/pages/user/WeekMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const WeekMatch: React.FC = () => {
아직 투표된 내용이 없습니다.
</div>
) : (
<div className="flex flex-col md:flex-rowjustify-center items-center overflow-x-auto gap-10 mt-10">
<div className="flex flex-col md:flex-row justify-center items-center overflow-x-hidden gap-10 mt-10">
{movieList.map((poster, idx) => (
<React.Fragment key={idx}>
<div className="flex flex-col">
Expand Down
1 change: 0 additions & 1 deletion src/pages/user/movie/MovieDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,6 @@ const MovieDetail: React.FC = () => {
createdAt={review.createdAt}
likeCount={review.likeCount}
myReview={review.myReview}
modify={review.modify}
myLike={review.myLike}
nickname={review.nickname}
memberId={review.memberId}
Expand Down