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 { cn } from '@/utils/cn';
|
||||||
import { getProfileName } from '@/utils/getters';
|
import { getProfileName } from '@/utils/getters';
|
||||||
import type { IClickhouseEvent, IServiceEvent } from '@openpanel/db';
|
import type { IClickhouseEvent, IServiceEvent } from '@openpanel/db';
|
||||||
import { useQuery, useSuspenseQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import {
|
import { FilterIcon, XIcon } from 'lucide-react';
|
||||||
ArrowLeftIcon,
|
|
||||||
ArrowRightIcon,
|
|
||||||
FilterIcon,
|
|
||||||
Loader2Icon,
|
|
||||||
XIcon,
|
|
||||||
} from 'lucide-react';
|
|
||||||
import { omit } from 'ramda';
|
import { omit } from 'ramda';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { popModal } from '.';
|
import { popModal } from '.';
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
type IServiceProfile,
|
type IServiceProfile,
|
||||||
|
type IServiceSession,
|
||||||
TABLE_NAMES,
|
TABLE_NAMES,
|
||||||
chQuery,
|
chQuery,
|
||||||
convertClickhouseDateToJs,
|
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 {
|
return {
|
||||||
event: res,
|
event: res,
|
||||||
|
|||||||
Reference in New Issue
Block a user