Skip to content

Commit

Permalink
✨ feat: metric panel에 lazy로딩 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
baegyeong committed Dec 5, 2024
1 parent 69cda1a commit daf0b42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 2 additions & 7 deletions packages/frontend/src/pages/stock-detail/StockDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@ import { lazy, Suspense } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { useParams } from 'react-router-dom';
import { StockDetailHeader } from './components';
import {
AddAlarmForm,
ChatPanel,
NotificationPanel,
StockMetricsPanel,
} from '.';
import { AddAlarmForm, ChatPanel, NotificationPanel, TradingChart } from '.';
import {
useGetOwnership,
useGetStockDetail,
} from '@/apis/queries/stock-detail';
import { Loader } from '@/components/ui/loader';

const TradingChart = lazy(() => import('./TradingChart'));
const StockMetricsPanel = lazy(() => import('./StockMetricsPanel'));

export const StockDetail = () => {
const { stockId = '' } = useParams();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface RealTimeStockData {
volume: number;
}

export const StockMetricsPanel = ({
const StockMetricsPanel = ({
eps,
high52w,
low52w,
Expand Down Expand Up @@ -75,3 +75,5 @@ export const StockMetricsPanel = ({
</article>
);
};

export default StockMetricsPanel;

0 comments on commit daf0b42

Please sign in to comment.