테블릿 로딩 이슈 수정
This commit is contained in:
@@ -46,6 +46,8 @@ export interface RightSidePanelProps {
|
||||
paperTradingEnabled?: boolean;
|
||||
paperAutoTradeEnabled?: boolean;
|
||||
onPaperOrderFilled?: () => void;
|
||||
/** 차트 화면·업비트 종목일 때만 체결 WS/REST */
|
||||
wsFeedEnabled?: boolean;
|
||||
}
|
||||
|
||||
const RightSidePanel: React.FC<RightSidePanelProps> = ({
|
||||
@@ -74,6 +76,7 @@ const RightSidePanel: React.FC<RightSidePanelProps> = ({
|
||||
paperTradingEnabled = false,
|
||||
paperAutoTradeEnabled = false,
|
||||
onPaperOrderFilled,
|
||||
wsFeedEnabled = true,
|
||||
}) => {
|
||||
const [openInternal, setOpenInternal] = useState(false);
|
||||
const [tabInternal, setTabInternal] = useState<TradeRightPanelTab>('trade');
|
||||
@@ -81,7 +84,7 @@ const RightSidePanel: React.FC<RightSidePanelProps> = ({
|
||||
|
||||
const isOpenControlled = openControlled !== undefined && onOpenChange !== undefined;
|
||||
const open = isOpenControlled ? !!openControlled : openInternal;
|
||||
const { trades: recentTrades, strength: tradeStrength } = useUpbitRecentTrades(market, open);
|
||||
const { trades: recentTrades, strength: tradeStrength } = useUpbitRecentTrades(market, open && wsFeedEnabled);
|
||||
const setOpen = (next: boolean | ((p: boolean) => boolean)) => {
|
||||
const cur = isOpenControlled ? !!openControlled : openInternal;
|
||||
const value = typeof next === 'function' ? next(cur) : next;
|
||||
|
||||
Reference in New Issue
Block a user