Skip to content

Commit

Permalink
feat: 기본 레이아웃
Browse files Browse the repository at this point in the history
  • Loading branch information
MinGu-Jeong committed Feb 8, 2024
1 parent 4cc1cda commit 121c8dd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 73 deletions.
42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

37 changes: 9 additions & 28 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { Suspense } from "react"
import { Route, Routes } from "react-router-dom"
import DefaultLayout from "layout/DefaultLayout"

function App() {
const [count, setCount] = useState(0)


return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
<Suspense fallback={<div/>}>
<Routes>
<Route path="/" element={<DefaultLayout/>} />
</Routes>
</Suspense>
)
}

Expand Down
6 changes: 6 additions & 0 deletions src/layout/DefaultLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default function DefaultLayout() {
return (
<>
</>
)
}
6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { BrowserRouter } from 'react-router-dom';

const queryClient = new QueryClient();

ReactDOM.createRoot(document.getElementById('root')!).render(
<QueryClientProvider client={queryClient}>
<React.StrictMode>
<BrowserRouter>
<App />
</React.StrictMode>
</BrowserRouter>
</QueryClientProvider>
)
7 changes: 7 additions & 0 deletions src/page/MemberInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function MemberInfo() {
return (
<div>
<h1>MemberInfo</h1>
</div>
)
}

0 comments on commit 121c8dd

Please sign in to comment.