1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-15 17:50:48 +02:00

refactor: mock out state

This commit is contained in:
Thomas Heartman 2024-10-11 11:31:08 +02:00
parent 7a7eb789ab
commit 2ccec1a8b5
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -171,6 +171,28 @@ const NoActiveFlagsInfo = styled('div')(({ theme }) => ({
gap: theme.spacing(2),
}));
type DashboardState =
| {
state: 'flags and projects';
// regular state; show everything
activeFlag: any;
activeProject: any;
}
| {
state: 'projects, no flags';
// show projects as normal, tell the user to create a flag
activeProject: any;
}
| {
state: 'no projects, no flags';
// no projects and no flags; show information about admins, project owners, and tell the user to join a project to create a flags
}
| {
state: 'flags, no projects';
// show info about admins + project owners, regular flags
activeFlag: any;
};
export const PersonalDashboard = () => {
const { user } = useAuthUser();
const { trackEvent } = usePlausibleTracker();