           div
             className: "score-rank score-rank--#{event.scoreRank}"
 
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.rank',
-              user: link(event.user.url, event.user.username)
-              rank: event.rank
-              beatmap: link(event.beatmap.url, event.beatmap.title)
-              mode: osu.trans "beatmaps.mode.#{event.mode}"
+        mappings =
+          user: link(event.user.url, event.user.username)
+          rank: event.rank
+          beatmap: link(event.beatmap.url, event.beatmap.title)
+          mode: osu.trans "beatmaps.mode.#{event.mode}"
 
       when 'rankLost'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.rank_lost',
-              user: link(event.user.url, event.user.username)
-              rank: event.rank
-              beatmap: link(event.beatmap.url, event.beatmap.title)
-              mode: osu.trans "beatmaps.mode.#{event.mode}"
+        mappings =
+          user: link(event.user.url, event.user.username)
+          rank: event.rank
+          beatmap: link(event.beatmap.url, event.beatmap.title)
+          mode: osu.trans "beatmaps.mode.#{event.mode}"
 
       when 'userSupportAgain'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.user_support_again',
-              user: link(event.user.url, event.user.username)
+        mappings =
+          user: link(event.user.url, event.user.username)
 
       when 'userSupportFirst'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.user_support_first',
-              user: link(event.user.url, event.user.username)
+        mappings =
+          user: link(event.user.url, event.user.username)
 
       when 'userSupportGift'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.user_support_gift',
-              user: link(event.user.url, event.user.username)
+        mappings =
+          user: link(event.user.url, event.user.username)
 
       when 'usernameChange'
-        text = div
-          className: 'profile-extra-entries__text'
-          dangerouslySetInnerHTML:
-            __html: osu.trans 'events.username_change',
-              user: link(event.user.url, event.user.username)
-              previousUsername: event.user.previousUsername
+        mappings =
+          user: link(event.user.url, event.user.username)
+          previousUsername: event.user.previousUsername
 
       else
         # unkown event

      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: =>
