File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,14 @@ import TopBar from "@/app/components/TopBar";
3333import CheckToggle from "@/app/components/CheckToggle" ;
3434import Groups from "@/app/components/Groups" ;
3535
36- let lastUpdate : string = "" ;
37-
3836export function InstrumentData ( { instrumentName } : { instrumentName : string } ) {
3937 const [ showHiddenBlocks , setShowHiddenBlocks ] = useState ( false ) ;
4038 const CONFIG_DETAILS = "CS:BLOCKSERVER:WD_CONF_DETAILS" ;
4139 const [ instlist , setInstlist ] = useState < instList | null > ( null ) ;
4240 const [ currentInstrument , setCurrentInstrument ] = useState < Instrument | null > (
4341 null ,
4442 ) ;
43+ const [ lastUpdate , setLastUpdate ] = useState < str > ( "" ) ;
4544
4645 const instName = instrumentName ;
4746
@@ -119,7 +118,7 @@ export function InstrumentData({ instrumentName }: { instrumentName: string }) {
119118 // config hasnt actually changed so do nothing
120119 return ;
121120 }
122- lastUpdate = updatedPVbytes ;
121+ setLastUpdate ( updatedPVbytes ) ;
123122 const res = dehex_and_decompress ( atob ( updatedPVbytes ) ) ;
124123 currentInstrument . groups = getGroupsWithBlocksFromConfigOutput (
125124 JSON . parse ( res ) ,
You can’t perform that action at this time.
0 commit comments