Skip to content

Commit

Permalink
OZ-770: Hide phone or email if not provided (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk authored Jan 20, 2025
1 parent f83f3cb commit e1fbae3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
<img src="./ozone_logo.svg" />
</div>
<div class="contact-info spacing">
<% if (supportPhone.replace(/\D/g, '')) { %>
<div class="contact-info-item">
<img width="16" src="./Phone.svg" />
<span><%=supportPhone%></span>
</div>
<% } %>
<% if (/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(supportEmail)) { %>
<div class="contact-info-item">
<img width="16" src="./Email.svg" />
<span><%=supportEmail%></span>
</div>
<% } %>
</div>
<p class="footer"><%=pageGenerationTimeLabel%> <%=serverStartTime%> (UTC)</p>
</main>
Expand Down

0 comments on commit e1fbae3

Please sign in to comment.