mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	https://linear.app/unleash/issue/2-2354/new-in-unleash-section-in-sidebar Add a "New in Unleash" section in the side bar and use it to announce signals and actions.  Inside signals page we're also including a feedback button to try to collect some insights.  --------- Co-authored-by: Nuno Góis <github@nunogois.com>
		
			
				
	
	
		
			20 lines
		
	
	
		
			555 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			555 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { createLocalStorage } from '../utils/createLocalStorage';
 | 
						|
 | 
						|
export type IFeedbackCategory =
 | 
						|
    | 'search'
 | 
						|
    | 'insights'
 | 
						|
    | 'applicationOverview'
 | 
						|
    | 'newProjectOverview'
 | 
						|
    | 'signals';
 | 
						|
 | 
						|
export const useUserSubmittedFeedback = (category: IFeedbackCategory) => {
 | 
						|
    const key = `unleash-userSubmittedFeedback:${category}`;
 | 
						|
 | 
						|
    const { value: hasSubmittedFeedback, setValue: setHasSubmittedFeedback } =
 | 
						|
        createLocalStorage<Boolean>(key, false);
 | 
						|
    return {
 | 
						|
        hasSubmittedFeedback,
 | 
						|
        setHasSubmittedFeedback,
 | 
						|
    };
 | 
						|
};
 |