fix: view event details without session
This commit is contained in:
@@ -18,14 +18,8 @@ import { useTRPC } from '@/integrations/trpc/react';
|
||||
import { cn } from '@/utils/cn';
|
||||
import { getProfileName } from '@/utils/getters';
|
||||
import type { IClickhouseEvent, IServiceEvent } from '@openpanel/db';
|
||||
import { useQuery, useSuspenseQuery } from '@tanstack/react-query';
|
||||
import {
|
||||
ArrowLeftIcon,
|
||||
ArrowRightIcon,
|
||||
FilterIcon,
|
||||
Loader2Icon,
|
||||
XIcon,
|
||||
} from 'lucide-react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { FilterIcon, XIcon } from 'lucide-react';
|
||||
import { omit } from 'ramda';
|
||||
import { useState } from 'react';
|
||||
import { popModal } from '.';
|
||||
|
||||
@@ -4,6 +4,7 @@ import { z } from 'zod';
|
||||
|
||||
import {
|
||||
type IServiceProfile,
|
||||
type IServiceSession,
|
||||
TABLE_NAMES,
|
||||
chQuery,
|
||||
convertClickhouseDateToJs,
|
||||
@@ -104,7 +105,10 @@ export const eventRouter = createTRPCRouter({
|
||||
});
|
||||
}
|
||||
|
||||
const session = await sessionService.byId(res?.sessionId, projectId);
|
||||
let session: IServiceSession | undefined;
|
||||
if (res?.sessionId) {
|
||||
session = await sessionService.byId(res?.sessionId, projectId);
|
||||
}
|
||||
|
||||
return {
|
||||
event: res,
|
||||
|
||||
Reference in New Issue
Block a user