Skip to content

Commit ee17668

Browse files
committed
fix: session replay links on admin dashboard
1 parent e21d086 commit ee17668

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

lib/algora_web/live/admin/admin_live.ex

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,20 @@ defmodule AlgoraWeb.Admin.AdminLive do
8383
</div>
8484
"""
8585

86-
# String.match?(value, ~r/^[^\s]+@[^\s]+$/) && assigns.posthog_project_id ->
87-
# ~H"""
88-
# <.link
89-
# href={"https://us.posthog.com/project/#{@posthog_project_id}/person/#{@value}#activeTab=sessionRecordings"}
90-
# rel="noopener"
91-
# >
92-
# {@value}
93-
# </.link>
94-
# """
86+
String.match?(value, ~r/^[^\s]+@[^\s]+$/) && assigns.posthog_project_id ->
87+
~H"""
88+
<div class="flex items-center gap-2">
89+
<.link
90+
href={"https://us.posthog.com/project/#{@posthog_project_id}/person/#{@value}#activeTab=sessionRecordings"}
91+
rel="noopener"
92+
target="_blank"
93+
class="h-8 w-8 rounded-lg bg-muted flex items-center justify-center hover:bg-muted-foreground/40"
94+
>
95+
<.icon name="tabler-video" class="h-4 w-4" />
96+
</.link>
97+
{@value}
98+
</div>
99+
"""
95100

96101
String.match?(value, ~r/^[^\s]+@[^\s]+$/) ->
97102
~H"""
@@ -206,7 +211,13 @@ defmodule AlgoraWeb.Admin.AdminLive do
206211
<%= for row <- results.rows do %>
207212
<tr class="border-b border-border">
208213
<%= for value <- row do %>
209-
<td class="p-4"><.cell value={value} timezone={@timezone} /></td>
214+
<td class="p-4">
215+
<.cell
216+
value={value}
217+
timezone={@timezone}
218+
posthog_project_id={@posthog_project_id}
219+
/>
220+
</td>
210221
<% end %>
211222
</tr>
212223
<% end %>

0 commit comments

Comments
 (0)