Skip to content

Commit

Permalink
update standard event
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-lem committed Mar 5, 2025
1 parent f5d9efc commit e593d99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 45 deletions.
4 changes: 2 additions & 2 deletions frontend/app/src/entities/events/ui/event-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Icon } from "@iconify-icon/react";
import { BRANCH_EVENTS, STANDARD_EVENTS } from "../constants";
import { BranchEventTitle } from "./branch-events/branch-event-title";
import { NodeEventTitle } from "./node-events/node-event-title";
import { StandardEvent } from "./standard-events/standard-event";
import { StandardEventTitle } from "./standard-events/standard-event-title";

export const EventAttributes = ({ attributes }: Pick<NodeMutatedEvent, "attributes">) => {
return (
Expand Down Expand Up @@ -176,7 +176,7 @@ export const EventCard = (props: EventType) => {

{BRANCH_EVENTS.includes(props.__typename) && <BranchEventTitle {...props} />}

{STANDARD_EVENTS.includes(props.__typename) && <StandardEvent {...props} />}
{STANDARD_EVENTS.includes(props.__typename) && <StandardEventTitle {...props} />}

<div className="flex justify-between text-gray-500">
<DateDisplay date={props.occurred_at} />
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/src/entities/events/ui/global-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BRANCH_EVENTS, GROUP_EVENTS, STANDARD_EVENTS } from "../constants";
import { BranchEventTitle } from "./branch-events/branch-event-title";
import { GroupEventTitle } from "./group-events/group-event-title";
import { NodeEventTitle } from "./node-events/node-event-title";
import { StandardEvent } from "./standard-events/global-standard-event";
import { StandardEventTitle } from "./standard-events/standard-event-title";

const GlobalEventDisplay = ({ __typename, ...props }: EventType) => {
if ("attributes" in props) {
Expand All @@ -20,7 +20,7 @@ const GlobalEventDisplay = ({ __typename, ...props }: EventType) => {
}

if (STANDARD_EVENTS.includes(__typename)) {
return <StandardEvent {...props} />;
return <StandardEventTitle {...props} />;
}

if (GROUP_EVENTS.includes(__typename)) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ export const STANDARD_EVENTS_MAPPING: Record<string, (props: EventNodeInterface)
},
};

export const StandardEvent = (props: EventNodeInterface) => {
export const StandardEventTitle = (props: EventNodeInterface) => {
const { event, account_id } = props;

return (
<>
<div className="flex items-center justify-between">
<div className="flex items-center gap-2 text-sm">
<div className="font-semibold">
<NodeLabel id={account_id} />
</div>
<div className="flex items-center gap-1 text-sm">
<NodeLabel id={account_id} />

<div className="text-gray-500">
{STANDARD_EVENTS_MAPPING[event] && STANDARD_EVENTS_MAPPING[event](props)}
Expand Down

0 comments on commit e593d99

Please sign in to comment.