chore: added sign-up/in, onboarding, dashboard, all-issues related events (#3595)
* chore: added event constants * chore: added workspace events * chore: added workspace group for events * chore: member invitation event added * chore: added project pages related events. * fix: member integer role to string * chore: added sign-up & sign-in events * chore: added global-view related events * chore: added notification related events * chore: project, cycle property change added * chore: cycle favourite, and change-properties added * chore: module davorite, and sidebar property changes added * fix: build errors * chore: all events defined in constants
This commit is contained in:
parent
8d730e6680
commit
4f72ebded9
80 changed files with 1276 additions and 507 deletions
|
|
@ -4,11 +4,12 @@ import Link from "next/link";
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Plus } from "lucide-react";
|
||||
// store hooks
|
||||
import { useGlobalView, useUser } from "hooks/store";
|
||||
import { useEventTracker, useGlobalView, useUser } from "hooks/store";
|
||||
// components
|
||||
import { CreateUpdateWorkspaceViewModal } from "components/workspace";
|
||||
// constants
|
||||
import { DEFAULT_GLOBAL_VIEWS_LIST, EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { GLOBAL_VIEW_OPENED } from "constants/event-tracker";
|
||||
|
||||
const ViewTab = observer((props: { viewId: string }) => {
|
||||
const { viewId } = props;
|
||||
|
|
@ -49,11 +50,19 @@ export const GlobalViewsHeader: React.FC = observer(() => {
|
|||
const {
|
||||
membership: { currentWorkspaceRole },
|
||||
} = useUser();
|
||||
const { captureEvent } = useEventTracker();
|
||||
|
||||
// bring the active view to the centre of the header
|
||||
useEffect(() => {
|
||||
if (!globalViewId) return;
|
||||
|
||||
captureEvent(GLOBAL_VIEW_OPENED, {
|
||||
view_id: globalViewId,
|
||||
view_type: ["all-issues", "assigned", "created", "subscribed"].includes(globalViewId.toString())
|
||||
? "Default"
|
||||
: "Custom",
|
||||
});
|
||||
|
||||
const activeTabElement = document.querySelector(`#global-view-${globalViewId.toString()}`);
|
||||
|
||||
if (activeTabElement) activeTabElement.scrollIntoView({ behavior: "smooth", inline: "center" });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue