Skip to content

Commit

Permalink
Merge pull request #263 from AnotherUniverseAU/DongHyuk
Browse files Browse the repository at this point in the history
REFACT: Debug Router => Real Router
  • Loading branch information
cucumber5252 authored May 16, 2024
2 parents 73c8593 + 9cc4e02 commit 149ea77
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 58 deletions.
110 changes: 55 additions & 55 deletions src/components/auth/autoRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,68 +48,27 @@ const Authorization = ({ redirectTo, children }: AuthorizationProps) => {
}
};

// const RouterInfo: RouterItem[] = [
// { path: "/landing", element: <Landing />, withAuthorization: true },
// { path: "/login", element: <Login />, withAuthorization: false },
// { path: "/redirection", element: <Redirection />, withAuthorization: false },
// // { path: "/permission", element: <Permission />, withAuthorization: true },
// { path: "/nickname", element: <Nickname />, withAuthorization: true },
// { path: "/createInfo", element: <CreateInfo />, withAuthorization: true },
// {
// path: "/contributeInfo",
// element: <ContributeInfo />,
// withAuthorization: true,
// },
// { path: "/create", element: <Create />, withAuthorization: true },
// { path: "/detail/:id", element: <Detail />, withAuthorization: true },
// { path: "/profile", element: <Profile />, withAuthorization: true },
// { path: "/nicknameEdit", element: <NicknameEdit />, withAuthorization: true },
// { path: "/notification", element: <Notification />, withAuthorization: true },
// { path: "/notice", element: <Notice />, withAuthorization: true },
// { path: "/withdraw", element: <Withdraw />, withAuthorization: true },
// { path: "/chatlist", element: <ChatList />, withAuthorization: true },
// { path: "/tokentest", element: <TokenTest />, withAuthorization: true },
// { path: "/loading", element: <Loading />, withAuthorization: false },
// {
// path: "/eachNicknameEdit",
// element: <EachNicknameEdit />,
// withAuthorization: true,
// },
// { path: "/au_admin_2023", element: <Admin />, withAuthorization: true },
// { path: "/au_admin_send", element: <SendMessage />, withAuthorization: true },
// { path: "/", element: <Main />, withAuthorization: true },
// {
// path: "/noticeDetail",
// element: <NoticeDetail />,
// withAuthorization: true,
// },
// { path: "/chatroom/:id", element: <ChatRoom />, withAuthorization: true },
// { path: "/complain/:id", element: <Complain />, withAuthorization: true },
// { path: "/copyright", element: <Copyright />, withAuthorization: false },
// ];

////디버깅용
const RouterInfo: RouterItem[] = [
{ path: '/landing', element: <Landing />, withAuthorization: false },
{ path: '/landing', element: <Landing />, withAuthorization: true },
{ path: '/login', element: <Login />, withAuthorization: false },
{ path: '/redirection', element: <Redirection />, withAuthorization: false },
// { path: "/permission", element: <Permission />, withAuthorization: true },
{ path: '/nickname', element: <Nickname />, withAuthorization: false },
{ path: '/nickname', element: <Nickname />, withAuthorization: true },
{ path: '/createInfo', element: <CreateInfo />, withAuthorization: true },
{
path: '/contributeInfo',
element: <ContributeInfo />,
withAuthorization: true,
},
{ path: '/create', element: <Create />, withAuthorization: false },
{ path: '/detail/:id', element: <Detail />, withAuthorization: false },
{ path: '/profile', element: <Profile />, withAuthorization: false },
{ path: '/nicknameEdit', element: <NicknameEdit />, withAuthorization: false },
{ path: '/notification', element: <Notification />, withAuthorization: false },
{ path: '/notice', element: <Notice />, withAuthorization: false },
{ path: '/withdraw', element: <Withdraw />, withAuthorization: false },
{ path: '/chatlist', element: <ChatList />, withAuthorization: false },
{ path: '/tokentest', element: <TokenTest />, withAuthorization: false },
{ path: '/create', element: <Create />, withAuthorization: true },
{ path: '/detail/:id', element: <Detail />, withAuthorization: true },
{ path: '/profile', element: <Profile />, withAuthorization: true },
{ path: '/nicknameEdit', element: <NicknameEdit />, withAuthorization: true },
{ path: '/notification', element: <Notification />, withAuthorization: true },
{ path: '/notice', element: <Notice />, withAuthorization: true },
{ path: '/withdraw', element: <Withdraw />, withAuthorization: true },
{ path: '/chatlist', element: <ChatList />, withAuthorization: true },
{ path: '/tokentest', element: <TokenTest />, withAuthorization: true },
{ path: '/loading', element: <Loading />, withAuthorization: false },
{
path: '/eachNicknameEdit',
Expand All @@ -118,16 +77,57 @@ const RouterInfo: RouterItem[] = [
},
{ path: '/au_admin_2023', element: <Admin />, withAuthorization: true },
{ path: '/au_admin_send', element: <SendMessage />, withAuthorization: true },
{ path: '/', element: <Main />, withAuthorization: false },
{ path: '/', element: <Main />, withAuthorization: true },
{
path: '/noticeDetail',
element: <NoticeDetail />,
withAuthorization: true,
},
{ path: '/chatroom/:id', element: <ChatRoom />, withAuthorization: false },
{ path: '/complain/:id', element: <Complain />, withAuthorization: false },
{ path: '/chatroom/:id', element: <ChatRoom />, withAuthorization: true },
{ path: '/complain/:id', element: <Complain />, withAuthorization: true },
{ path: '/copyright', element: <Copyright />, withAuthorization: false },
];

// ////디버깅용
// const RouterInfo: RouterItem[] = [
// { path: '/landing', element: <Landing />, withAuthorization: false },
// { path: '/login', element: <Login />, withAuthorization: false },
// { path: '/redirection', element: <Redirection />, withAuthorization: false },
// // { path: "/permission", element: <Permission />, withAuthorization: true },
// { path: '/nickname', element: <Nickname />, withAuthorization: false },
// { path: '/createInfo', element: <CreateInfo />, withAuthorization: true },
// {
// path: '/contributeInfo',
// element: <ContributeInfo />,
// withAuthorization: true,
// },
// { path: '/create', element: <Create />, withAuthorization: false },
// { path: '/detail/:id', element: <Detail />, withAuthorization: false },
// { path: '/profile', element: <Profile />, withAuthorization: false },
// { path: '/nicknameEdit', element: <NicknameEdit />, withAuthorization: false },
// { path: '/notification', element: <Notification />, withAuthorization: false },
// { path: '/notice', element: <Notice />, withAuthorization: false },
// { path: '/withdraw', element: <Withdraw />, withAuthorization: false },
// { path: '/chatlist', element: <ChatList />, withAuthorization: false },
// { path: '/tokentest', element: <TokenTest />, withAuthorization: false },
// { path: '/loading', element: <Loading />, withAuthorization: false },
// {
// path: '/eachNicknameEdit',
// element: <EachNicknameEdit />,
// withAuthorization: true,
// },
// { path: '/au_admin_2023', element: <Admin />, withAuthorization: true },
// { path: '/au_admin_send', element: <SendMessage />, withAuthorization: true },
// { path: '/', element: <Main />, withAuthorization: false },
// {
// path: '/noticeDetail',
// element: <NoticeDetail />,
// withAuthorization: true,
// },
// { path: '/chatroom/:id', element: <ChatRoom />, withAuthorization: false },
// { path: '/complain/:id', element: <Complain />, withAuthorization: false },
// ];

const AutoRouter = (refreshToken: any) => {
return (
<Routes>
Expand Down
3 changes: 0 additions & 3 deletions src/pages/chat/room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,6 @@ export const ChatRoom = (): JSX.Element => {
<S.ModalSubTextContainer>
<S.ModalSubText>비속어 등 부적절한 채팅이 감지되어</S.ModalSubText>
<S.ModalSubText> 전송이 불가합니다.</S.ModalSubText>
{/* <S.ModalSubText>사용자의 부적절한 채팅은</S.ModalSubText>
<S.ModalSubText>캐릭터에게 상처를 줄 수 있으므로</S.ModalSubText>
<S.ModalSubText>해당 채팅은 전달되지 않았습니다</S.ModalSubText> */}
</S.ModalSubTextContainer>
<S.ModalButton onClick={() => setIsWarningModalOpen(false)}>확인</S.ModalButton>
</S.ModalContainer>
Expand Down

0 comments on commit 149ea77

Please sign in to comment.