Skip to content

Commit

Permalink
fix: ui problems
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Oct 21, 2024
1 parent 753223e commit e4ad76e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions keep-ui/app/incidents/[id]/incident-activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function IncidentActivityChronoItem({ activity }: { activity: any }) {
{subTitle} <TimeAgo date={activity.timestamp + "Z"} />
</span>
{activity.text && (
<div className="absolute top-14 font-light text-gray-400">
<div className="absolute top-14 font-light text-gray-800">
{activity.text}
</div>
)}
Expand Down Expand Up @@ -122,15 +122,19 @@ export function IncidentActivityChronoItemComment({

return (
<div className="flex h-full w-full relative items-center">
<TextInput value={comment} onValueChange={setComment} />
<TextInput
value={comment}
onValueChange={setComment}
placeholder="Add a new comment..."
/>
<Button
color="orange"
variant="secondary"
className="ml-2.5"
disabled={!comment}
onClick={onSubmit}
>
Submit
Comment
</Button>
</div>
);
Expand Down Expand Up @@ -205,18 +209,18 @@ export default function IncidentActivity({
<IncidentActivityChronoItemComment
mutator={mutateIncidentActivity}
incident={incident}
key={index}
key={activity.id}
/>
) : (
<IncidentActivityChronoItem key={index} activity={activity} />
<IncidentActivityChronoItem key={activity.id} activity={activity} />
)
);
const chronoIcons = activities?.map((activity, index) => {
if (activity.type === "comment" || activity.type === "newcomment") {
const user = users?.find((user) => user.email === activity.initiator);
return (
<UserAvatar
key={`icon-${index}`}
key={`icon-${activity.id}`}
image={user?.picture}
name={user?.name ?? user?.email ?? (activity.initiator as string)}
/>
Expand All @@ -226,7 +230,7 @@ export default function IncidentActivity({
const imagePath = `/icons/${source}-icon.png`;
return (
<Image
key={`icon-${index}`}
key={`icon-${activity.id}`}
alt={source}
height={24}
width={24}
Expand All @@ -249,6 +253,7 @@ export default function IncidentActivity({
mode="VERTICAL"
cardWidth={600}
cardHeight={100}
allowDynamicUpdate={true}
>
{chronoContent}
<div className="chrono-icons">{chronoIcons}</div>
Expand Down

0 comments on commit e4ad76e

Please sign in to comment.