Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 라우터 잘못 쓰고 있는 것 수정 #190

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 />);
Loading