From f8e9264e9c9ecfe7d1f3e75aa7bffaee206f70ed Mon Sep 17 00:00:00 2001 From: leomet07 Date: Sat, 2 Mar 2024 21:57:53 -0500 Subject: [PATCH] Use .replace with regex instead of .replaceAll for max browser compatability --- pages/staff/[staff_identifier].tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/staff/[staff_identifier].tsx b/pages/staff/[staff_identifier].tsx index d91e4df..add3160 100644 --- a/pages/staff/[staff_identifier].tsx +++ b/pages/staff/[staff_identifier].tsx @@ -38,8 +38,10 @@ function StaffMember(props: Props) { staff_member.description || `${staff_member.name} at The Stuyvesant Spectator`; - const display_email = staff_member.email.replaceAll("@", " [ at ] ").replaceAll(".", " [ dot ] "); - + const display_email = staff_member.email + .replace(/@/g, " [ at ] ") + .replace(/\./g, " [ dot ] "); + return (
@@ -52,9 +54,7 @@ function StaffMember(props: Props) { ({staff_member.slug}) - - {display_email} - + {display_email}

{staff_member.description}