Skip to content

Commit

Permalink
πŸš‘ fix: κ΄€λ¦¬μž νŽ˜μ΄μ§€ 타이틀 μˆ˜μ • (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbearcookie authored Apr 25, 2024
1 parent d963300 commit 9ed6ea8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
41 changes: 19 additions & 22 deletions src/AdminApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,31 @@ import Background from '@/components/Background';
import BackgroundImg from '@/assets/background.png';
import UnknownErrorBoundary from '@/components/ErrorBoundary/UnknownErrorBoundary';
import ApiErrorBoundary from '@/components/ErrorBoundary/ApiErrorBoundary';
import TitleHelmet from '@/components/TitleHelmet';
import RootUnknownFallback from './components/ErrorBoundary/fallback/RootUnknownFallback';
import RootApiFallback from './components/ErrorBoundary/fallback/RootApiFallback';
import 'react-toastify/dist/ReactToastify.css';

const AdminApp = () => {
return (
<Background imageUrl={BackgroundImg}>
<button
onClick={() => {
throw new Error('Sentry ν…ŒμŠ€νŠΈ');
}}
>
Sentry μˆ˜μ§‘ ν…ŒμŠ€νŠΈ
</button>
<UnknownErrorBoundary FallbackComponent={RootUnknownFallback}>
<ApiErrorBoundary FallbackComponent={RootApiFallback}>
<Outlet />
</ApiErrorBoundary>
</UnknownErrorBoundary>
<ToastContainer
autoClose={1500}
css={css({
margin: '4rem 0 5rem 0',
padding: '0 1rem',
boxSizing: 'border-box',
})}
/>
</Background>
<>
<TitleHelmet />
<Background imageUrl={BackgroundImg}>
<UnknownErrorBoundary FallbackComponent={RootUnknownFallback}>
<ApiErrorBoundary FallbackComponent={RootApiFallback}>
<Outlet />
</ApiErrorBoundary>
</UnknownErrorBoundary>
<ToastContainer
autoClose={1500}
css={css({
margin: '4rem 0 5rem 0',
padding: '0 1rem',
boxSizing: 'border-box',
})}
/>
</Background>
</>
);
};

Expand Down
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import BackgroundImg from '@/assets/background.png';
import Audio from '@/components/Audio';
import UnknownErrorBoundary from '@/components/ErrorBoundary/UnknownErrorBoundary';
import ApiErrorBoundary from '@/components/ErrorBoundary/ApiErrorBoundary';
import TitleMelmet from '@/components/TitleMelmet';
import TitleHelmet from '@/components/TitleHelmet';
import RootUnknownFallback from './components/ErrorBoundary/fallback/RootUnknownFallback';
import RootApiFallback from './components/ErrorBoundary/fallback/RootApiFallback';
import 'react-toastify/dist/ReactToastify.css';

const App = () => {
return (
<>
<TitleMelmet />
<TitleHelmet />
<Background imageUrl={BackgroundImg}>
<div css={styles.root}>
<UnknownErrorBoundary FallbackComponent={RootUnknownFallback}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Helmet } from 'react-helmet-async';
import { useLocation } from 'react-router-dom';
import { getCurrentPageTitle } from '@/utils/routeUtils';

const TitleMelmet = () => {
const TitleHelmet = () => {
const location = useLocation();
const currentPageTitle = getCurrentPageTitle(location.pathname);

Expand All @@ -17,4 +17,4 @@ const TitleMelmet = () => {
);
};

export default TitleMelmet;
export default TitleHelmet;

0 comments on commit 9ed6ea8

Please sign in to comment.