mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
		
			
				
	
	
		
			11 lines
		
	
	
		
			300 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			300 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { useMemo } from 'react';
 | |
| import { type Variant, getVariantValue } from 'utils/variants';
 | |
| 
 | |
| export const useVariant = <T = string>(variant?: Variant) => {
 | |
|     return useMemo(() => {
 | |
|         if (variant?.enabled) {
 | |
|             return getVariantValue<T>(variant);
 | |
|         }
 | |
|     }, [variant]);
 | |
| };
 |