fix(client-config): set isLoaded to false on API status update (#12371)
Attempt at #12289 (edit Félix: removed fix keyword since I don't think it fixes it) --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { ContextStoreViewType } from '@/context-store/types/ContextStoreViewType';
|
||||
import { View } from '@/views/types/View';
|
||||
import { ViewType } from '@/views/types/ViewType';
|
||||
|
||||
export const getViewType = ({
|
||||
isSettingsPage,
|
||||
isRecordShowPage,
|
||||
isRecordIndexPage,
|
||||
view,
|
||||
}: {
|
||||
isSettingsPage: boolean;
|
||||
isRecordShowPage: boolean;
|
||||
isRecordIndexPage: boolean;
|
||||
view?: View;
|
||||
}) => {
|
||||
if (isSettingsPage) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isRecordIndexPage) {
|
||||
return view?.type === ViewType.Kanban
|
||||
? ContextStoreViewType.Kanban
|
||||
: ContextStoreViewType.Table;
|
||||
}
|
||||
|
||||
if (isRecordShowPage) {
|
||||
return ContextStoreViewType.ShowPage;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user