Skip to content

Commit

Permalink
[FE][Fix][Refactor] : Layout 폴더 src로 이동 및 console.log 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
effozen committed Dec 4, 2024
1 parent b8870f0 commit 50e24d3
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion frontend/src/component/content/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useNavigate } from 'react-router-dom';
import { getChannelInfo } from '@/api/channel.api';
import { useContext } from 'react';
import { ChannelContext } from '@/context/ChannelContext';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';
import { Dropdown } from '../common/dropdown/Dropdown';
import { FooterContext } from '../layout/footer/LayoutFooterProvider';

interface IContentProps {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/header/HeaderBackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { MdArrowBackIos } from 'react-icons/md';
import { useNavigate } from 'react-router-dom';
import { Button } from '@/component/common/button/Button.tsx';
import { useContext } from 'react';
import { FooterContext } from '../layout/footer/LayoutFooterProvider';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';

export const HeaderBackButton = () => {
const { resetFooterContext } = useContext(FooterContext);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Outlet } from 'react-router-dom';
import { LayoutHeader } from '@/component/layout/header/LayoutHeader.tsx';
import { LayoutHeader } from '@/layout/header/LayoutHeader.tsx';
import { HeaderDropdownProvider } from '@/component/header/HeaderDropdownProvider.tsx';
import { LayoutFooterProvider } from '@/component/layout/footer/LayoutFooterProvider';
import { LayoutFooterProvider } from '@/layout/footer/LayoutFooterProvider.tsx';
import { ToggleProvider } from '@/context/DropdownContext.tsx';
import { LayoutFooter } from './footer/LayoutFooter';
import { LayoutFooter } from './footer/LayoutFooter.tsx';

export const Layout = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HeaderBackButton } from '@/component/header/HeaderBackButton';
import { HeaderDropdown } from '@/component/header/HeaderDropdown';
import { IItem } from '@/component/header/HeaderLayout';
import { HeaderBackButton } from '@/component/header/HeaderBackButton.tsx';
import { HeaderDropdown } from '@/component/header/HeaderDropdown.tsx';
import { IItem } from '@/component/header/HeaderLayout.tsx';
import React from 'react';
import { MdInfo } from 'react-icons/md';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from 'classnames';
import { buttonActiveStyle, buttonActiveType } from '../enumTypes';
import { buttonActiveStyle, buttonActiveType } from '../enumTypes.ts';

export interface IFooterProps {
title?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { Footer } from '@/component/layout/footer/Footer';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider.tsx';
import { Footer } from '@/layout/footer/Footer.tsx';

export const LayoutFooter = () => {
const { footerOption } = useContext(FooterContext);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode, createContext, useReducer, useMemo, useCallback } from 'react';
import { IFooterProps } from '@/component/layout/footer/Footer';
import { buttonActiveType } from '../enumTypes';
import { IFooterProps } from '@/layout/footer/Footer.tsx';
import { buttonActiveType } from '../enumTypes.ts';

interface ILayoutFooterProviderProps {
children: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useLocation, useParams } from 'react-router-dom';
import { getHeaderInfo } from '@/utils/mapping/HeaderMapping';
import { HeaderLayout } from '@/component/header/HeaderLayout';
import { getHeaderInfo } from '@/utils/mapping/HeaderMapping.ts';
import { HeaderLayout } from '@/component/header/HeaderLayout.tsx';

export const LayoutHeader = () => {
const params = useParams<Record<string, string | undefined>>();
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/AddChannel.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useContext, useEffect } from 'react';
import { HiMiniInformationCircle } from 'react-icons/hi2';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';
import { RouteSettingButton } from '@/component/routebutton/RouteSettingButton';
import { Outlet, useNavigate } from 'react-router-dom';
import { RouteResultButton } from '@/component/routebutton/RouteResultButton';
import { IUser, UserContext } from '@/context/UserContext';
import { buttonActiveType } from '@/component/layout/enumTypes';
import { buttonActiveType } from '@/layout/enumTypes';
import { createChannelReqEntity } from '@/api/dto/channel.dto';
import { createChannel } from '@/api/channel.api';
import { Page } from '@/component/routebutton/enum';
Expand Down Expand Up @@ -188,8 +188,8 @@ export const AddChannel = () => {
marker_style: user.marker_style,
})),
};
const response = await createChannel(channelData);
console.log('채널 생성 성공:', response);

await createChannel(channelData);
} catch (error) {
console.error('채널 생성 실패:', error);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/AddGuestPage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useContext, useEffect, useState } from 'react';
import { HiMiniInformationCircle } from 'react-icons/hi2';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';
import { RouteSettingButton } from '@/component/routebutton/RouteSettingButton';
import { Outlet, useNavigate } from 'react-router-dom';
import { RouteResultButton } from '@/component/routebutton/RouteResultButton';
import { IUser, UserContext } from '@/context/UserContext';
import { buttonActiveType } from '@/component/layout/enumTypes';
import { buttonActiveType } from '@/layout/enumTypes';
import { addChannelReqEntity, guestEntity } from '@/api/dto/channel.dto';
import { addGuestChannel } from '@/api/channel.api';
import { Page } from '@/component/routebutton/enum';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ChannelInfoPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext, useEffect, useState } from 'react';
import { HiMiniInformationCircle } from 'react-icons/hi2';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';
import { Outlet, useNavigate } from 'react-router-dom';
import { RouteResultButton } from '@/component/routebutton/RouteResultButton';
import { Page } from '@/component/routebutton/enum';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/DrawRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useContext, useEffect } from 'react';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';
import { useNavigate, useParams } from 'react-router-dom';
import { IUser, UserContext } from '@/context/UserContext';
import { ToolTypeProvider } from '@/context/ToolTypeContext';
import { buttonActiveType } from '@/component/layout/enumTypes';
import { buttonActiveType } from '@/layout/enumTypes';
import { MapProviderForDraw } from '@/component/canvasWithMap/canvasWithMapforDraw/MapProviderForDraw.tsx';
import { CurrentUserContext } from '@/context/CurrentUserContext';
import { getAddressFromCoordinates } from '@/utils/map/getAddress';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Fragment, useContext, useEffect, useRef, useState, ReactNode } from 'react';
import { MdLogout } from 'react-icons/md';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { FooterContext } from '@/layout/footer/LayoutFooterProvider';
import { useNavigate } from 'react-router-dom';
import { buttonActiveType } from '@/component/layout/enumTypes';
import { buttonActiveType } from '@/layout/enumTypes';
import { loadLocalData, saveLocalData, removeLocalData } from '@/utils/common/manageLocalData.ts';
import { AuthModal } from '@/component/authmodal/AuthModal';
import { deleteChannel, getUserChannels } from '@/api/channel.api.ts';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/IndexRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AddChannel } from '@/pages/AddChannel';
import { DrawRoute } from '@/pages/DrawRoute';
import { HostView } from '@/pages/HostView';
import { GuestView } from '@/pages/GuestView';
import { Layout } from '@/component/layout/Layout';
import { Layout } from '@/layout/Layout';
import { UserProvider } from '@/context/UserContext';
import { CurrentUserProvider } from '@/context/CurrentUserContext';
import { ChannelInfoPage } from '@/pages/ChannelInfoPage'; // ChannelInfoPage 컴포넌트 임포트
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/mapping/HeaderMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
HEADER_SUBTITLE,
HEADER_SUBTITLEICONS,
HEADER_TITLE,
} from '@/component/layout/constant/HeaderConst';
} from '@/layout/constant/HeaderConst';

const normalizePath = (path: string): string => {
return path
Expand Down

0 comments on commit 50e24d3

Please sign in to comment.