Skip to content

Commit

Permalink
fix: 메인 ootd 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jiohjung98 committed Oct 14, 2024
1 parent bf5f12a commit dae1a72
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 32 deletions.
4 changes: 4 additions & 0 deletions public/Ticket1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/Ticket2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/Ticket3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/TicketInactive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/app/oauth/callback/google/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function GoogleLogin() {
// role에 따라 페이지 이동
setTimeout(() => {
if (role === "MEMBER" || role === "ADMIN") {
router.push("/");
router.push("/ootd");
} else if (role === "GUEST") {
router.push("/blogRegister");
}
Expand All @@ -67,7 +67,7 @@ export default function GoogleLogin() {
if (error.response?.status === 401) {
Cookies.remove("accessToken");
Cookies.remove("role");
router.push("/");
router.push("/ootd");
}
} else {
console.error("Unexpected error:", error);
Expand Down
4 changes: 2 additions & 2 deletions src/app/oauth/callback/kakao/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function KakaoTalk() {
console.log("User role received:", role);
setTimeout(() => {
if (role === "MEMBER" || role === "ADMIN") {
router.push("/");
router.push("/ootd");
} else if (role === "GUEST") {
router.push("/blogRegister");
}
Expand All @@ -64,7 +64,7 @@ export default function KakaoTalk() {
if (error.response?.status === 401) {
Cookies.remove("accessToken");
Cookies.remove("role");
router.push("/");
router.push("/ootd");
}
} else {
console.error("Unexpected error:", error);
Expand Down
4 changes: 2 additions & 2 deletions src/app/oauth/callback/naver/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const NaverCallback = () => {
// role에 따라 페이지 이동
setTimeout(() => {
if (role === "MEMBER" || role === "ADMIN") {
router.push("/");
router.push("/ootd");
} else if (role === "GUEST") {
router.push("/blogRegister");
}
Expand All @@ -65,7 +65,7 @@ const NaverCallback = () => {
if (error.response?.status === 401) {
Cookies.remove("accessToken");
Cookies.remove("role");
router.push("/");
router.push("/ootd");
}
} else {
console.error("Unexpected error:", error);
Expand Down
2 changes: 1 addition & 1 deletion src/app/onBoarding/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const OnBoradingPage = () => {
}, []);

const homeRoute = () => {
router.push(`/`)
router.push(`/ootd`)
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/EmailVerification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const EmailVerification = () => {
onFocus={handleInputFocus}
onBlur={handleInputBlur}
onChange={handleEmailChange}
placeholder="[email protected]"
placeholder="[email protected]"
className="flex-1 border-gray-300 focus:border-[#FB3463] focus:outline-none"
style={{ background: "var(--4, #F5F5F5)", fontSize: "1.5rem" }}
disabled={isCodeVerified}
Expand Down
6 changes: 3 additions & 3 deletions src/components/auth/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ const LoginForm = () => {
Cookies.remove("accessToken");
Cookies.remove("refreshToken");
Cookies.remove('role');
router.push("/");
router.push("/ootd");
router.refresh();
}
if (accessToken && refreshToken) {
router.push("/");
router.push("/ootd");
}
};

Expand Down Expand Up @@ -75,7 +75,7 @@ const LoginForm = () => {
// 전역 상태에 유저 정보 저장
await fetchUserInfo(); // 전역 상태에 유저 정보를 업데이트

router.push("/");
router.push("/ootd");
}
router.refresh();
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/SocialLoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const SocialLoginForm = () => {
console.log(response);
console.log(response.data.result);
console.log(accessToken);
router.push("/");
router.push("/ootd");
console.log("Redirecting to login page...");
} catch (error) {
console.error("Error during social login:", error);
Expand Down
6 changes: 3 additions & 3 deletions src/components/blogSignUp/BlogRegisterFirst.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const BlogRegisterFirst = () => {
Cookies.remove("accessToken");
Cookies.remove("refreshToken");
Cookies.remove("role");
router.push("/");
router.push("/ootd");
return;
}

Expand All @@ -144,7 +144,7 @@ const BlogRegisterFirst = () => {
Cookies.remove("accessToken");
Cookies.remove("refreshToken");
Cookies.remove("role");
router.push("/");
router.push("/ootd");
break;
} else {
console.error(`${socialType} 다른 에러 발생:`, error);
Expand Down Expand Up @@ -210,7 +210,7 @@ const BlogRegisterFirst = () => {
}

if (role === "MEMBER" || role === "ADMIN") {
router.push("/");
router.push("/ootd");
return;
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/blogSignUp/BlogRegisterSecond.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const BlogRegisterSecond = () => {
Cookies.remove("accessToken");
Cookies.remove("refreshToken");
Cookies.remove("role");
router.push("/");
router.push("/ootd");
};

// 창 닫기 또는 새로 고침 이벤트 처리
Expand Down Expand Up @@ -55,7 +55,7 @@ const BlogRegisterSecond = () => {

// 로그인이 되었지만 role이 MEMBER 또는 ADMIN인 경우 리다이렉트
if (role === "MEMBER" || role === "ADMIN") {
router.push("/");
router.push("/ootd");
return;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/blogSignUp/BlogRegisterThird.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const BlogRegisterThird = () => {

// 로그인이 되었지만 role이 MEMBER 또는 ADMIN인 경우 리다이렉트
if (role === "MEMBER" || role === "ADMIN") {
router.push("/");
router.push("/ootd");
return;
}
};
Expand Down
14 changes: 7 additions & 7 deletions src/components/shared/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const Header = () => {
<div className="hidden mt-[20px] mb-[20px] sm-700:flex sm-700:justify-between sm-700:items-center sm-700:w-[66%] sm-700:mx-auto sm-700:relative">
<div className="flex items-center gap-10">
<div className="flex-shrink-0">
<Link href="/">
<Link href="/ootd">
<Image
src={LogoHeader}
alt="Logo"
Expand All @@ -157,20 +157,20 @@ const Header = () => {
</Link>
</div>
<div className="flex text-lg">
<Link href="/">
<Link href="/ootd">
<div
className={`text-gray-800 no-underline font-['Pretendard'] ${pathname === "/" ? "font-bold" : ""}`}
className={`text-gray-800 no-underline font-['Pretendard'] ${pathname === "/ootd" ? "font-bold" : ""}`}
style={{ fontSize: "1.4rem" }}
>
TICKET
OOTD
</div>
</Link>
<Link href="/ootd">
<Link href="/">
<div
className={`text-gray-800 pl-8 no-underline font-['Pretendard'] ${pathname === "/ootd" ? "font-bold" : ""}`}
className={`text-gray-800 pl-8 no-underline font-['Pretendard'] ${pathname === "/" ? "font-bold" : ""}`}
style={{ fontSize: "1.4rem" }}
>
OOTD
TICKET
</div>
</Link>
</div>
Expand Down
17 changes: 10 additions & 7 deletions src/components/shared/mobile/MobileFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ import EditorActiveIcon from '../../../../public/mobile_editor_active.svg';
import MyIcon from '../../../../public/mobile_my_inactive.svg';
import MyActiveIcon from '../../../../public/mobile_my_active.svg';
import postwriteImg from "@/dummy/postwrite.svg";
import TicketInactive from '../../../../public/Ticket3.svg';
import TicketActive from '../../../../public/Ticket2.svg';
import ootdWrite from "../../../../public/ootdWrite.svg";


const MobileFooter = () => {
const router = useRouter();
const pathname = usePathname();
Expand Down Expand Up @@ -63,25 +66,25 @@ const MobileFooter = () => {
<>
<div className="sm-700:hidden z-[9999] fixed bottom-0 py-[10px] flex items-center bg-black border-t border-gray100 bg-white w-full">
<div
onClick={() => router.push('/')}
onClick={() => router.push('/ootd')}
className="flex-1 flex flex-col gap-1 items-center">
<div>
<Image
src={pathname === '/' ? HomeActiveIcon : HomeIcon}
alt=""
src={pathname === '/ootd' ? OotdActiveIcon : OotdIcon}
alt="OOTD"
width={24}
height={40}
/>
</div>
</div>
<div
onClick={() => router.push('/ootd')}
onClick={() => router.push('/')}
className="flex-1 flex flex-col gap-1 items-center">
<div>
<Image
src={pathname.includes('/ootd') ? OotdActiveIcon : OotdIcon}
alt="OOTD"
width={24}
src={pathname ==='/' ? TicketActive : TicketInactive}
alt="TICKET"
width={28}
height={40}
/>
</div>
Expand Down

0 comments on commit dae1a72

Please sign in to comment.