File tree Expand file tree Collapse file tree
frontend/components/dashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export function ExplainedTermsCard() {
2929 const [ terms , setTerms ] = useState < string [ ] > ( [ ] ) ;
3030 const [ hiddenTerms , setHiddenTerms ] = useState < string [ ] > ( [ ] ) ;
3131 const [ loadError , setLoadError ] = useState ( false ) ;
32+ const [ isInitialLoad , setIsInitialLoad ] = useState ( true ) ;
3233
3334 useEffect ( ( ) => {
3435 getLearnedTerms ( )
@@ -54,10 +55,12 @@ export function ExplainedTermsCard() {
5455 startTransition ( ( ) => {
5556 setTerms ( visible ) ;
5657 setHiddenTerms ( hidden ) ;
58+ setIsInitialLoad ( false ) ;
5759 } ) ;
5860 } )
5961 . catch ( ( ) => {
6062 setLoadError ( true ) ;
63+ setIsInitialLoad ( false ) ;
6164 } ) ;
6265 } , [ ] ) ;
6366 const [ showMore , setShowMore ] = useState ( false ) ;
@@ -348,7 +351,7 @@ export function ExplainedTermsCard() {
348351 } ) }
349352 </ div >
350353 </ >
351- ) : (
354+ ) : ! isInitialLoad ? (
352355 < div className = "py-6 text-center" >
353356 < p className = "text-sm font-medium text-gray-600 dark:text-gray-300" >
354357 { t ( 'empty' ) }
@@ -357,7 +360,7 @@ export function ExplainedTermsCard() {
357360 { t ( 'emptyHint' ) }
358361 </ p >
359362 </ div >
360- ) }
363+ ) : null }
361364
362365 { /* Explained Terms Section */ }
363366 < div className = "mt-6" >
You can’t perform that action at this time.
0 commit comments