Explorar el Código
			
			Restore useLabelStore mistakenly removed in commit 403e2d58 (#24052)
			
				
Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
			
			tags/1.8.0
		 
		
			
				
					
						
						Yongtao Huang
					
					hace 2 meses
				 
				
			 
		 
		
			
				
				  
				  No account linked to committer's email address
				
			
		
		
		
	
	
		
			
				
				
					
						
						
							
								
									
										
											
	
		
			
			| 
				
			 | 
			
			 | 
			@@ -0,0 +1,15 @@ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import { create } from 'zustand' | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import type { Label } from './constant' | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			type State = { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  labelList: Label[] | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			} | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			type Action = { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  setLabelList: (labelList?: Label[]) => void | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			} | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			export const useStore = create<State & Action>(set => ({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  labelList: [], | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  setLabelList: labelList => set(() => ({ labelList })), | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			})) |