Skip to content

Commit

Permalink
[FE][Feat] : frontend 브렌치와 머지
Browse files Browse the repository at this point in the history
  • Loading branch information
effozen committed Nov 13, 2024
2 parents 79ee60e + ca9080e commit 9eb30fb
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 1 deletion.
26 changes: 26 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Route, Routes } from 'react-router-dom';
import { Main } from '@/pages/Main';
import { Register } from '@/pages/Register';
import { AddChannel } from '@/pages/AddChannel';
import { UserRoute } from '@/pages/UserRoute';
import { DrawRoute } from '@/pages/DrawRoute';
import { HostView } from '@/pages/HostView';
import { GuestView } from '@/pages/GuestView';

const ChannelRoutes = () => (
<Routes>
<Route path="host" element={<HostView />} />
<Route path="guest/:guestId" element={<GuestView />} />
</Routes>
);

export const App = () => (
<Routes>
<Route path="/" element={<Main />} />
<Route path="/register" element={<Register />} />
<Route path="/add-channel" element={<AddChannel />} />
<Route path="/add-channel/:user" element={<UserRoute />} />
<Route path="/add-channel/:user/draw" element={<DrawRoute />} />
<Route path="/channel/:channelId/*" element={<ChannelRoutes />} />
</Routes>
);
5 changes: 4 additions & 1 deletion frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import './index.css';
import { App } from './App';
// 우선은 폰트 다 포함시켰는데, 나중에 사용할 것들만 따로 뺴자.
Expand All @@ -15,6 +16,8 @@ import '@fontsource/pretendard/900.css';

createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
<BrowserRouter>
<App />
</BrowserRouter>
</StrictMode>,
);
1 change: 1 addition & 0 deletions frontend/src/pages/AddChannel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const AddChannel = () => <>Hello</>;
1 change: 1 addition & 0 deletions frontend/src/pages/DrawRoute.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const DrawRoute = () => <>Hello</>;
1 change: 1 addition & 0 deletions frontend/src/pages/GuestView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const GuestView = () => <>Hello</>;
1 change: 1 addition & 0 deletions frontend/src/pages/HostView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const HostView = () => <>Hello</>;
1 change: 1 addition & 0 deletions frontend/src/pages/Main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const Main = () => <>Hello</>;
1 change: 1 addition & 0 deletions frontend/src/pages/Register.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const Register = () => <>Hello</>;
1 change: 1 addition & 0 deletions frontend/src/pages/UserRoute.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const UserRoute = () => <>Hello</>;

0 comments on commit 9eb30fb

Please sign in to comment.