diff --git a/src/pages/lotto/Functions.jsx b/src/pages/lotto/Functions.jsx
index 640c51c..9fd5608 100644
--- a/src/pages/lotto/Functions.jsx
+++ b/src/pages/lotto/Functions.jsx
@@ -1,7 +1,9 @@
-import { useState } from 'react';
+import { useCallback, useState } from 'react';
import BriefingTab from './tabs/BriefingTab';
import AnalysisTab from './tabs/AnalysisTab';
import PurchaseTab from './tabs/PurchaseTab';
+import { useIsMobile } from '../../hooks/useIsMobile';
+import SwipeableView from '../../components/SwipeableView';
const TABS = [
{ id: 'briefing', label: '🗓 이번 주 브리핑' },
@@ -11,22 +13,44 @@ const TABS = [
export default function Functions() {
const [tab, setTab] = useState('briefing');
+ const isMobile = useIsMobile();
+
+ const tabIndex = TABS.findIndex(t => t.id === tab);
+
+ const handleTabChange = useCallback((index) => {
+ setTab(TABS[index].id);
+ }, []);
+
return (
-
-
- {tab === 'briefing' &&
}
- {tab === 'analysis' &&
}
- {tab === 'purchase' &&
}
-
+ {isMobile ? (
+
({
+ key: t.id,
+ label: t.label,
+ content: t.id === 'briefing' ? : t.id === 'analysis' ? : ,
+ }))}
+ activeIndex={tabIndex}
+ onTabChange={handleTabChange}
+ />
+ ) : (
+ <>
+
+
+ {tab === 'briefing' &&
}
+ {tab === 'analysis' &&
}
+ {tab === 'purchase' &&
}
+
+ >
+ )}
);
}
diff --git a/src/pages/lotto/Lotto.css b/src/pages/lotto/Lotto.css
index 940e225..a53865d 100644
--- a/src/pages/lotto/Lotto.css
+++ b/src/pages/lotto/Lotto.css
@@ -1513,4 +1513,16 @@
@media (max-width: 768px) {
.lotto-tabs { overflow-x: auto; }
.lotto-tabs button { white-space: nowrap; }
+
+ /* 구매 이력 테이블 가로 스크롤 */
+ .purchase-list {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .lotto-ball {
+ width: 32px;
+ height: 32px;
+ font-size: 13px;
+ }
}