Refactor: 리랜더링을 위한 key 설정

This commit is contained in:
정현조 2024-09-30 13:18:03 +09:00
parent a16ba44776
commit 4dee5fc1d2

View File

@ -56,6 +56,7 @@ export default function TrainingTab({ projectId }: TrainingTabProps) {
return (
<div className="grid grid-rows-[auto_1fr] gap-8 md:grid-cols-2">
<TrainingSettings
key={selectedModel?.isTrain ? 'training' : 'settings'}
projectId={numericProjectId}
selectedModel={selectedModel}
setSelectedModel={setSelectedModel}
@ -65,6 +66,7 @@ export default function TrainingTab({ projectId }: TrainingTabProps) {
className="h-full"
/>
<TrainingGraph
key={selectedModel?.isTrain ? 'training' : 'graph'}
projectId={numericProjectId}
selectedModel={selectedModel}
className="h-full"