Move to record page for mobile view (#16195)

Summary

- Move record open behavior to record page for mobile view.


https://github.com/user-attachments/assets/cbf87ec7-8232-4d15-b767-b38097593a5a


Closes #15960
This commit is contained in:
spiderman3000
2025-12-01 20:39:29 +05:30
committed by GitHub
parent ee08060798
commit af23fddfa2
@@ -11,6 +11,7 @@ import { useRecoilComponentCallbackState } from '@/ui/utilities/state/component-
import { ViewOpenRecordInType } from '@/views/types/ViewOpenRecordInType';
import { useRecoilCallback } from 'recoil';
import { AppPath } from 'twenty-shared/types';
import { useIsMobile } from 'twenty-ui/utilities';
import { useNavigateApp } from '~/hooks/useNavigateApp';
export const useOpenRecordFromIndexView = () => {
@@ -21,6 +22,8 @@ export const useOpenRecordFromIndexView = () => {
const navigate = useNavigateApp();
const { openRecordInCommandMenu } = useOpenRecordInCommandMenu();
const isMobile = useIsMobile();
const currentRecordFilters = useRecoilComponentCallbackState(
currentRecordFiltersComponentState,
recordIndexId,
@@ -69,6 +72,7 @@ export const useOpenRecordFromIndexView = () => {
);
if (
!isMobile &&
recordIndexOpenRecordIn === ViewOpenRecordInType.SIDE_PANEL &&
canOpenObjectInSidePanel(objectNameSingular)
) {
@@ -92,6 +96,7 @@ export const useOpenRecordFromIndexView = () => {
objectNameSingular,
navigate,
openRecordInCommandMenu,
isMobile,
],
);