diff --git a/appview/pages/templates/repo/fragments/reactions.html b/appview/pages/templates/repo/fragments/reactions.html
new file mode 100644
index 00000000..4ba3d6c2
--- /dev/null
+++ b/appview/pages/templates/repo/fragments/reactions.html
@@ -0,0 +1,50 @@
+{{ define "repo/fragments/reactions" }}
+
+ {{- $reactions := .Reactions -}}
+ {{- $userReacted := .UserReacted -}}
+ {{- $threadAt := .ThreadAt -}}
+
+ {{ template "reactionsPopup" }}
+ {{ range $kind := const.OrderedReactionKinds }}
+ {{ $reactionData := index $reactions $kind }}
+ {{ template "repo/fragments/reaction"
+ (dict
+ "Kind" $kind
+ "Count" $reactionData.Count
+ "IsReacted" (index $userReacted $kind)
+ "ThreadAt" $threadAt
+ "Users" $reactionData.Users) }}
+ {{ end }}
+
+{{ end }}
+
+{{ define "reactionsPopup" }}
+
+{{ end }}
diff --git a/appview/pages/templates/repo/fragments/reactionsPopUp.html b/appview/pages/templates/repo/fragments/reactionsPopUp.html
deleted file mode 100644
index 1464d3fa..00000000
--- a/appview/pages/templates/repo/fragments/reactionsPopUp.html
+++ /dev/null
@@ -1,30 +0,0 @@
-{{ define "repo/fragments/reactionsPopUp" }}
-
-{{ end }}
diff --git a/appview/pages/templates/repo/issues/issue.html b/appview/pages/templates/repo/issues/issue.html
index ccd9f2bd..ac485f7f 100644
--- a/appview/pages/templates/repo/issues/issue.html
+++ b/appview/pages/templates/repo/issues/issue.html
@@ -35,8 +35,11 @@
{{ if .Issue.Body }}
- {{ template "issueReactions" . }}
+
+ {{ template "repo/fragments/reactions"
+ (dict "Reactions" .Reactions
+ "UserReacted" .UserReacted
+ "ThreadAt" .Issue.AtUri) }}
{{ end }}
@@ -107,25 +110,6 @@
{{ end }}
-{{ define "issueReactions" }}
-
- {{ template "repo/fragments/reactionsPopUp" const.OrderedReactionKinds }}
- {{ range $kind := const.OrderedReactionKinds }}
- {{ $reactionData := index $.Reactions $kind }}
- {{
- template "repo/fragments/reaction"
- (dict
- "Kind" $kind
- "Count" $reactionData.Count
- "IsReacted" (index $.UserReacted $kind)
- "ThreadAt" $.Issue.AtUri
- "Users" $reactionData.Users)
- }}
- {{ end }}
-
-{{ end }}
-
-
{{ define "repoAfter" }}
{{
diff --git a/appview/pages/templates/repo/pulls/fragments/pullHeader.html b/appview/pages/templates/repo/pulls/fragments/pullHeader.html
index 7d2c0eae..df3ce000 100644
--- a/appview/pages/templates/repo/pulls/fragments/pullHeader.html
+++ b/appview/pages/templates/repo/pulls/fragments/pullHeader.html
@@ -63,23 +63,12 @@
{{ end }}
- {{ with const.OrderedReactionKinds }}
-
- {{ template "repo/fragments/reactionsPopUp" . }}
- {{ range $kind := . }}
- {{ $reactionData := index $.Reactions $kind }}
- {{
- template "repo/fragments/reaction"
- (dict
- "Kind" $kind
- "Count" $reactionData.Count
- "IsReacted" (index $.UserReacted $kind)
- "ThreadAt" $.Pull.AtUri
- "Users" $reactionData.Users)
- }}
- {{ end }}
+
+ {{ template "repo/fragments/reactions"
+ (dict "Reactions" .Reactions
+ "UserReacted" .UserReacted
+ "ThreadAt" .Pull.AtUri) }}
- {{ end }}