* refactor: move web utils to packages * fix: build and lint errors * chore: update drag handle plugin * chore: update table cell type to fix build errors * fix: build errors * chore: sync few changes * fix: build errors * chore: minor fixes related to duplicate assets imports * fix: build errors * chore: minor changes
11 lines
383 B
TypeScript
11 lines
383 B
TypeScript
// plane imports
|
|
import { ETabIndices, TAB_INDEX_MAP } from "@plane/constants";
|
|
|
|
export const getTabIndex = (type?: ETabIndices, isMobile: boolean = false) => {
|
|
const getIndex = (key: string) =>
|
|
isMobile ? undefined : type && TAB_INDEX_MAP[type].findIndex((tabIndex) => tabIndex === key) + 1;
|
|
|
|
const baseTabIndex = isMobile ? -1 : 1;
|
|
|
|
return { getIndex, baseTabIndex };
|
|
};
|