From 992d4fa045625035a1e1daf2999e8a43873a1f71 Mon Sep 17 00:00:00 2001 From: Hanna922 Date: Fri, 9 Feb 2024 16:40:00 +0900 Subject: [PATCH] feat: move LogClick, LogScreen components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - components 폴더 내로 분리했습니다. --- src/{ => components}/LogClick.tsx | 4 ++-- src/{ => components}/LogScreen.tsx | 4 ++-- src/demo/App.tsx | 4 ++-- src/demo/Drawer.tsx | 5 +++-- src/demo/Home.tsx | 4 ++-- src/demo/main.tsx | 1 - 6 files changed, 11 insertions(+), 11 deletions(-) rename src/{ => components}/LogClick.tsx (85%) rename src/{ => components}/LogScreen.tsx (77%) diff --git a/src/LogClick.tsx b/src/components/LogClick.tsx similarity index 85% rename from src/LogClick.tsx rename to src/components/LogClick.tsx index d721f60..3b817ce 100644 --- a/src/LogClick.tsx +++ b/src/components/LogClick.tsx @@ -1,6 +1,6 @@ import { Children, cloneElement } from 'react'; -import { useYLSLogger } from '.'; -import { LogPayloadParams } from './types/LogType'; +import { useYLSLogger } from '..'; +import { LogPayloadParams } from '../types/LogType'; interface Props { children: React.ReactElement; diff --git a/src/LogScreen.tsx b/src/components/LogScreen.tsx similarity index 77% rename from src/LogScreen.tsx rename to src/components/LogScreen.tsx index 544bc7f..d4e5cd9 100644 --- a/src/LogScreen.tsx +++ b/src/components/LogScreen.tsx @@ -1,6 +1,6 @@ -import { useYLSLogger } from '.'; +import { useYLSLogger } from '..'; import { useEffect } from 'react'; -import { LogPayloadParams } from './types/LogType'; +import { LogPayloadParams } from '../types/LogType'; interface Props { children: React.ReactNode; diff --git a/src/demo/App.tsx b/src/demo/App.tsx index bdcad57..0c1a623 100644 --- a/src/demo/App.tsx +++ b/src/demo/App.tsx @@ -1,7 +1,7 @@ -import { BrowserRouter } from 'react-router-dom'; -import { Routes, Route } from 'react-router-dom'; +import { Routes, Route, BrowserRouter } from 'react-router-dom'; import { Home } from './Home'; import { Drawer } from './Drawer'; + export const App = () => { return ( <> diff --git a/src/demo/Drawer.tsx b/src/demo/Drawer.tsx index 79cd0fa..ab2d6dd 100644 --- a/src/demo/Drawer.tsx +++ b/src/demo/Drawer.tsx @@ -1,7 +1,8 @@ import { useState } from 'react'; -import { LogClick } from '../LogClick'; +import { LogClick } from '../components/LogClick'; import { useLocation } from 'react-router-dom'; -import { LogScreen } from '../LogScreen'; +import { LogScreen } from '../components/LogScreen'; + export const Drawer = () => { const [count, setCount] = useState(0); const router = useLocation(); diff --git a/src/demo/Home.tsx b/src/demo/Home.tsx index f7b6bf6..0ddef24 100644 --- a/src/demo/Home.tsx +++ b/src/demo/Home.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; -import { LogClick } from '../LogClick'; +import { LogClick } from '../components/LogClick'; import { useLocation } from 'react-router-dom'; -import { LogScreen } from '../LogScreen'; +import { LogScreen } from '../components/LogScreen'; export const Home = () => { const [count, setCount] = useState(0); diff --git a/src/demo/main.tsx b/src/demo/main.tsx index 6a90344..dccf3eb 100644 --- a/src/demo/main.tsx +++ b/src/demo/main.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import ReactDOM from 'react-dom/client'; import { App } from './App';