mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 20:05:48 -05:00
Make personal access tokens soft-deletable; update front-end
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { useStoreState } from '@/state/hooks';
|
||||
|
||||
export default (context: string | string[]) => {
|
||||
const key = Array.isArray(context) ? context.join(':') : context;
|
||||
const uuid = useStoreState(state => state.user.data?.uuid);
|
||||
|
||||
if (!key.trim().length) {
|
||||
throw new Error('Must provide a valid context key to "useUserSWRContextKey".');
|
||||
}
|
||||
|
||||
return `swr::${uuid || 'unknown'}:${key.trim()}`;
|
||||
};
|
||||
Reference in New Issue
Block a user