mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-27 00:19:39 +01:00
Adds a Biome rule for "no unused imports", which is something we sometimes have trouble catching. We're adding this as a warning for now. It is safely and easily fixable with `yarn lint:fix`.  
15 lines
481 B
TypeScript
15 lines
481 B
TypeScript
import { createLocalStorage } from '../utils/createLocalStorage';
|
|
|
|
export type IFeedbackCategory = 'search' | 'newStrategyForm';
|
|
|
|
export const useUserSubmittedFeedback = (category: IFeedbackCategory) => {
|
|
const key = `unleash-userSubmittedFeedback:${category}`;
|
|
|
|
const { value: hasSubmittedFeedback, setValue: setHasSubmittedFeedback } =
|
|
createLocalStorage<Boolean>(key, false);
|
|
return {
|
|
hasSubmittedFeedback,
|
|
setHasSubmittedFeedback,
|
|
};
|
|
};
|