mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-12 13:48:35 +02:00
We're migrating to ESM, which will allow us to import the latest versions of our dependencies. Co-Authored-By: Christopher Kolstad <chriswk@getunleash.io>
21 lines
580 B
TypeScript
21 lines
580 B
TypeScript
import { createLocalStorage } from '../utils/createLocalStorage.js';
|
|
|
|
export type IFeedbackCategory =
|
|
| 'search'
|
|
| 'insights'
|
|
| 'applicationOverview'
|
|
| 'newProjectOverview'
|
|
| 'signals'
|
|
| 'projectStatus';
|
|
|
|
export const useUserSubmittedFeedback = (category: IFeedbackCategory) => {
|
|
const key = `unleash-userSubmittedFeedback:${category}`;
|
|
|
|
const { value: hasSubmittedFeedback, setValue: setHasSubmittedFeedback } =
|
|
createLocalStorage<Boolean>(key, false);
|
|
return {
|
|
hasSubmittedFeedback,
|
|
setHasSubmittedFeedback,
|
|
};
|
|
};
|