Skip to content

Commit

Permalink
Merge pull request #190 from Nexters/develop
Browse files Browse the repository at this point in the history
fix: 라우터 잘못 쓰고 있는 것 수정
  • Loading branch information
alstn2468 authored Sep 24, 2024
2 parents ab00bb7 + 7b92cb3 commit 349ce94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
17 changes: 7 additions & 10 deletions apps/preview/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import './index.css';
import 'the-new-css-reset/css/reset.css';

import { QueryClientProvider, ShowPreviewResponse } from '@boolti/api';
import { ShowPreviewResponse } from '@boolti/api';
import { BooltiUIProvider } from '@boolti/ui';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { HelmetProvider } from 'react-helmet-async';

import ShowPreviewPage from './pages/ShowPreviewPage/ShowPreviewPage';
import ShowPreviewPage from './pages/ShowPreviewPage';
import { fetcher } from '@boolti/api/src/fetcher';

const router = createBrowserRouter([
Expand All @@ -15,7 +15,6 @@ const router = createBrowserRouter([
element: <ShowPreviewPage />,
loader: async ({ params }) => {
const showId = params.showId;

if (showId) {
const response = await fetcher.get<ShowPreviewResponse>(`web/papi/v1/shows/${showId}`);
return response;
Expand All @@ -26,13 +25,11 @@ const router = createBrowserRouter([

const App = () => {
return (
<QueryClientProvider>
<BooltiUIProvider>
<HelmetProvider>
<RouterProvider router={router} />
</HelmetProvider>
</BooltiUIProvider>
</QueryClientProvider>
<BooltiUIProvider>
<HelmetProvider>
<RouterProvider router={router} />
</HelmetProvider>
</BooltiUIProvider>
);
};

Expand Down
7 changes: 1 addition & 6 deletions apps/preview/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import ReactDOM from 'react-dom/client';

import App from './App.tsx';
import { BrowserRouter } from 'react-router-dom';

ReactDOM.createRoot(document.getElementById('root')!).render(
<BrowserRouter>
<App />
</BrowserRouter>,
);
ReactDOM.createRoot(document.getElementById('root')!).render(<App />);

0 comments on commit 349ce94

Please sign in to comment.