mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-18 11:14:57 +02:00
15 lines
458 B
TypeScript
15 lines
458 B
TypeScript
import useProject from './api/getters/useProject/useProject';
|
|
|
|
const DEFAULT_STICKINESS = 'default';
|
|
export const useDefaultProjectSettings = (projectId: string) => {
|
|
const { project, loading, error } = useProject(projectId);
|
|
return {
|
|
defaultStickiness: Boolean(project.defaultStickiness)
|
|
? project.defaultStickiness
|
|
: DEFAULT_STICKINESS,
|
|
mode: project.mode,
|
|
loading: loading,
|
|
error,
|
|
};
|
|
};
|