1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/frontend/src/hooks/useDefaultProjectSettings.ts

15 lines
449 B
TypeScript
Raw Normal View History

import useProject from './api/getters/useProject/useProject';
const DEFAULT_STICKINESS = 'default';
export const useDefaultProjectSettings = (projectId: string) => {
const { project, loading, error } = useProject(projectId);
return {
defaultStickiness: project.defaultStickiness
? project.defaultStickiness
: DEFAULT_STICKINESS,
mode: project.mode,
loading: loading,
error,
};
};