Skip to content

Commit

Permalink
Merge pull request #263 from ssu-student-union/hotfix/#261_allow-beta
Browse files Browse the repository at this point in the history
Hotfix/#261 allow beta
  • Loading branch information
dvp-tae authored Oct 21, 2024
2 parents fba368b + 2559b2d commit 78db17f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const queryClient = new QueryClient({
function App() {
/* 총학 홈페이지 접근 시 ssuketch로 리다이렉트 되도록 임시 설정 */
useEffect(() => {
window.location.href = 'https://ssuketch60.cafe24.com/';
if (window.location.pathname !== '/beta') {
window.location.href = 'https://ssuketch60.cafe24.com/';
}
}, []);

return (
Expand Down
4 changes: 2 additions & 2 deletions src/apis/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const client = axios.create({

client.interceptors.request.use(
(config: CustomInternalAxiosRequestConfig) => {
// console.log(config);
if (config.requireAuth && localStorage.getItem('accessToken')) {
const accessToken = localStorage.getItem('accessToken');
config.headers = config.headers || {};
Expand All @@ -40,7 +39,8 @@ client.interceptors.response.use(
/* 액세스 토큰 만료 시 로직 처리 */
if (error.response.data.code === 'TOKEN_003') {
localStorage.clear();
window.location.href = '/';
// 임시로 메인 라우팅 /beta로 변경
window.location.href = '/beta';
}
} else if (error.request) {
console.error('Request error:', error.request);
Expand Down
3 changes: 2 additions & 1 deletion src/containers/common/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function Header({ state = State.Onboarding, onLogout = () => {} }: Header
}
/>
<div className={cn(styles.headerItemStyle, 'xs:px-0.5 sm:px-0.5 md:px-0.5 lg:px-0.5')}>
<Link to="/">
{/* 임시로 메인 라우팅 /beta로 변경 */}
<Link to="/beta">
<div className="flex items-center gap-4">
<Logo size={isSmall ? '23px' : '46px'} fill={styles.fillColor} />
<span className={cn(styles.textColor, 'min-w-fit text-[20px] text-lg font-bold')}>US:SUM</span>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/general/containers/GeneralRegisterSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
localStorage.setItem('majorName', response.data?.data?.majorName);
localStorage.setItem('accessToken', response.data?.data?.accessToken);
}
navigate('/');
// 임시로 메인 라우팅 /beta로 변경
navigate('/beta');
setLoginState(true);
} else {
alert('로그인 정보가 일치하지 않습니다. 다시 시도해주세요.');
Expand Down
3 changes: 2 additions & 1 deletion src/pages/kakao/containers/KakaoRedirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const KakaoRedirect = () => {
if (res.data.isFirst) {
navigate('/register/tos'); // 최초 회원가입 유저는 약관 동의 화면으로 이동
} else {
navigate('/'); // 이미 가입된 유저는 메인 화면으로 이동
// 임시로 메인 라우팅 /beta로 변경
navigate('/beta'); // 이미 가입된 유저는 메인 화면으로 이동
setLoginState(true);
}
} else {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/layout/headerLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export function Layout() {
const handleLogout = () => {
localStorage.clear();
setLoginState(false);
navigate('/');
// 임시로 메인 라우팅 /beta로 변경
navigate('/beta');
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function MainRouter() {
return (
<Routes>
<Route path="/" element={<Layout />}>
<Route path="/" element={<MainPage />} />
<Route path="/beta" element={<MainPage />} />
{/*소개*/}
<Route path="/intro" element={<IntroPage />} />
<Route path="/intro/edit" element={<IntroEditPage />} />
Expand Down

0 comments on commit 78db17f

Please sign in to comment.