Fixes #9761 Instead of cleaning RecoilState we should keep the api key visible as long as the user didn't refresh/leave the app, it's better from a UX perspective and the code is also more elegant, removing a useEffect Note: the root cause of the bug was a missing "/settings" path in isMatchingLocation in useCleaningRecoilState (due to the recent refactoring) ; but I think this fix is better
7 lines
217 B
TypeScript
7 lines
217 B
TypeScript
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState';
|
|
|
|
export const apiKeyTokenFamilyState = createFamilyState<string | null, string>({
|
|
key: 'apiKeyTokenState',
|
|
defaultValue: null,
|
|
});
|