Skip to content

Commit

Permalink
seems useful
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarticus committed Jul 18, 2024
1 parent 76e5462 commit ef262d8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions frontend/src/scenes/feature-flags/activityDescriptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const nameOrLinkToFlag = (id: string | undefined, name: string | null | undefine
return id ? <Link to={urls.featureFlag(id)}>{displayName}</Link> : displayName
}

export const featureFlagActionsMapping: Record<
const featureFlagActionsMapping: Record<
keyof FeatureFlagType,
(change?: ActivityChange, logItem?: ActivityLogItem) => ChangeMapping | null
> = {
Expand Down Expand Up @@ -260,7 +260,21 @@ export function flagActivityDescriber(logItem: ActivityLogItem, asNotification?:
return { description: null }
}

// TODO:Dylan add event for creation
if (logItem.activity === 'created') {
return {
description: (
<SentenceList
listParts={[<>created a new feature flag:</>]}
prefix={
<>
<strong>{userNameForLogItem(logItem)}</strong>
</>
}
suffix={<> {nameOrLinkToFlag(logItem?.item_id, logItem?.detail.name)}</>}
/>
),
}
}

if (logItem.activity == 'updated') {
let changes: Description[] = []
Expand Down

0 comments on commit ef262d8

Please sign in to comment.