- useSubMenu에 scat 서브메뉴 설정 추가 (survey, distribution, pre-scat) - ScatView wrapper 컴포넌트로 서브탭 분기 처리 - SurveyView, DistributionView placeholder 컴포넌트 생성 - hasPermission에 부모 리소스 fallback 로직 추가 (scat:survey → scat) - App.tsx에서 PreScatView → ScatView 교체 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
712 B
TypeScript
28 lines
712 B
TypeScript
import { useSubMenu } from '@common/hooks/useSubMenu';
|
|
import { PreScatView } from './PreScatView';
|
|
import SurveyView from './SurveyView';
|
|
import DistributionView from './DistributionView';
|
|
|
|
export function ScatView() {
|
|
const { activeSubTab } = useSubMenu('scat');
|
|
|
|
const renderContent = () => {
|
|
switch (activeSubTab) {
|
|
case 'survey':
|
|
return <SurveyView />;
|
|
case 'distribution':
|
|
return <DistributionView />;
|
|
case 'pre-scat':
|
|
return <PreScatView />;
|
|
default:
|
|
return <SurveyView />;
|
|
}
|
|
};
|
|
|
|
return (
|
|
<div className="flex flex-col h-full w-full bg-bg-0">
|
|
<div className="flex-1 overflow-auto">{renderContent()}</div>
|
|
</div>
|
|
);
|
|
}
|