chore(root): rename organizationSlug to organizationId (#91)
This commit is contained in:
committed by
GitHub
parent
0221948aab
commit
cd16ac878d
@@ -16,7 +16,7 @@ import { EventIcon } from './event-icon';
|
||||
type EventListItemProps = IServiceEventMinimal | IServiceEvent;
|
||||
|
||||
export function EventListItem(props: EventListItemProps) {
|
||||
const { organizationSlug, projectId } = useAppParams();
|
||||
const { organizationId, projectId } = useAppParams();
|
||||
const { createdAt, name, path, duration, meta } = props;
|
||||
const profile = 'profile' in props ? props.profile : null;
|
||||
|
||||
@@ -88,7 +88,7 @@ export function EventListItem(props: EventListItemProps) {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
href={`/${organizationSlug}/${projectId}/profiles/${profile?.id}`}
|
||||
href={`/${organizationId}/${projectId}/profiles/${profile?.id}`}
|
||||
className="max-w-[80px] overflow-hidden text-ellipsis whitespace-nowrap text-muted-foreground hover:underline"
|
||||
>
|
||||
{getProfileName(profile)}
|
||||
|
||||
@@ -10,12 +10,12 @@ export function ProjectLink({
|
||||
className?: string;
|
||||
title?: string;
|
||||
}) {
|
||||
const { organizationSlug, projectId } = useAppParams();
|
||||
const { organizationId, projectId } = useAppParams();
|
||||
if (typeof props.href === 'string') {
|
||||
return (
|
||||
<Link
|
||||
{...props}
|
||||
href={`/${organizationSlug}/${projectId}/${props.href.replace(
|
||||
href={`/${organizationId}/${projectId}/${props.href.replace(
|
||||
/^\//,
|
||||
'',
|
||||
)}`}
|
||||
|
||||
@@ -8,13 +8,13 @@ import { TABLE_NAMES, chQuery } from '@openpanel/db';
|
||||
import { ChartSSR } from '../chart-ssr';
|
||||
import { FadeIn } from '../fade-in';
|
||||
|
||||
function ProjectCard({ id, name, organizationSlug }: IServiceProject) {
|
||||
function ProjectCard({ id, name, organizationId }: IServiceProject) {
|
||||
// For some unknown reason I get when navigating back to this page when using <Link />
|
||||
// Should be solved: https://github.com/vercel/next.js/issues/61336
|
||||
// But still get the error
|
||||
return (
|
||||
<a
|
||||
href={`/${organizationSlug}/${id}`}
|
||||
href={`/${organizationId}/${id}`}
|
||||
className="card inline-flex flex-col gap-2 p-4 transition-transform hover:-translate-y-1"
|
||||
>
|
||||
<div className="font-medium">{name}</div>
|
||||
|
||||
@@ -96,7 +96,7 @@ function AccessCell({
|
||||
setAccess(newAccess);
|
||||
mutation.mutate({
|
||||
userId: row.original.user!.id,
|
||||
organizationSlug: row.original.organizationId,
|
||||
organizationId: row.original.organizationId,
|
||||
access: newAccess as string[],
|
||||
});
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user