               achieved_at: event.created_at
               achievement_id: event.achievement.id
 
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.achievement',
-              user: link(event.user.url, event.user.username)
-              achievement: event.achievement.name
+        mappings =
+          user: link(event.user.url, event.user.username)
+          achievement: event.achievement.name
 
       when 'beatmapPlaycount'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.beatmap_playcount',
-              beatmap: link(event.beatmap.url, event.beatmap.title)
-              count: event.count
+        mappings =
+          beatmap: link(event.beatmap.url, event.beatmap.title)
+          count: event.count
 
       when 'beatmapsetApprove'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.beatmapset_approve',
-              approval: osu.trans "events.beatmapset_status.#{event.approval}"
-              beatmapset: link(event.beatmapset.url, event.beatmapset.title)
-              user: link(event.user.url, event.user.username)
+        mappings =
+          approval: osu.trans "events.beatmapset_status.#{event.approval}"
+          beatmapset: link(event.beatmapset.url, event.beatmapset.title)
+          user: link(event.user.url, event.user.username)
 
       when 'beatmapsetDelete'
-        text = div
-          className: 'profile-extra-entries__text'
-          osu.trans 'events.beatmapset_delete',
-            beatmapset: event.beatmapset.title
+        mappings =
+          beatmapset: event.beatmapset.title
 
       when 'beatmapsetRevive'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.beatmapset_revive',
-              beatmapset: link(event.beatmapset.url, event.beatmapset.title)
-              user: link(event.user.url, event.user.username)
+        mappings =
+          beatmapset: link(event.beatmapset.url, event.beatmapset.title)
+          user: link(event.user.url, event.user.username)
 
       when 'beatmapsetUpdate'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.beatmapset_update',
-              user: link(event.user.url, event.user.username)
-              beatmapset: link(event.beatmapset.url, event.beatmapset.title)
+        mappings =
+          user: link(event.user.url, event.user.username)
+          beatmapset: link(event.beatmapset.url, event.beatmapset.title)
 
       when 'beatmapsetUpload'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.beatmapset_upload',
-              beatmapset: link(event.beatmapset.url, event.beatmapset.title)
-              user: link(event.user.url, event.user.username)
+        mappings =
+          beatmapset: link(event.beatmapset.url, event.beatmapset.title)
+          user: link(event.user.url, event.user.username)
 
       when 'medal'
         # shouldn't exist because the type is overridden to achievement.

      div
        className: 'profile-extra-entries__detail'
        badge
        text
      div
        className: 'profile-extra-entries__time'
        el TimeWithTooltip,

# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
# See the LICENCE file in the repository root for full licence text.

import { snakeCase } from 'lodash'
import AchievementBadge from 'profile-page/achievement-badge'
import ExtraHeader from 'profile-page/extra-header'
import * as React from 'react'
import { a, div, li, p, ul } from 'react-dom-factories'
import ShowMoreLink from 'show-more-link'
import StringWithComponent from 'string-with-component'
import TimeWithTooltip from 'time-with-tooltip'
el = React.createElement

export class RecentActivity extends React.PureComponent
  link = (url, title) ->
    a
      className: 'profile-extra-entries__link'
      href: url
      title


  render: =>
