From 50dd0fac6abd2f0b54e03f1d448e3b6aa93b9616 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 11 Apr 2022 21:54:35 +0000 Subject: [PATCH] Raise AdminCert loading to prevent race condition --- webclient/src/AdminMembers.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/webclient/src/AdminMembers.js b/webclient/src/AdminMembers.js index b89ca9d..1c6ee00 100644 --- a/webclient/src/AdminMembers.js +++ b/webclient/src/AdminMembers.js @@ -623,9 +623,8 @@ export function AdminMemberTraining(props) { }; export function AdminCert(props) { - const { token, result, name, field, refreshResult } = props; + const { token, result, name, field, refreshResult, loading, setLoading } = props; const member = result.member; - const [loading, setLoading] = useState(false); const handleCert = (e) => { e.preventDefault(); @@ -682,6 +681,7 @@ export function AdminCert(props) { export function AdminMemberCertifications(props) { const member = props.result.member; + const [loading, setLoading] = useState(false); return (
@@ -704,55 +704,55 @@ export function AdminMemberCertifications(props) { Common {member.vetted_date || member.orientation_date ? 'Yes' : 'No'} New Members: Orientation and Basic Safety - + Wood 1 {member.wood_cert_date ? 'Yes, ' + member.wood_cert_date : 'No'} Woodworking Tools 1: Intro to Saws - + Wood 2 {member.wood2_cert_date ? 'Yes, ' + member.wood2_cert_date : 'No'} Woodworking Tools 2: Jointer, Thickness Planer, Drum Sander - + Lathe {member.lathe_cert_date ? 'Yes, ' + member.lathe_cert_date : 'No'} Metal: Metal Cutting & Manual Lathe - + Mill {member.mill_cert_date ? 'Yes, ' + member.mill_cert_date : 'No'} Metal: Manual Mill & Advanced Lathe - + Tormach CNC {member.tormach_cnc_cert_date ? 'Yes, ' + member.tormach_cnc_cert_date : 'No'} Tormach: CAM and Tormach Intro - + Precix CNC {member.precix_cnc_cert_date ? 'Yes, ' + member.precix_cnc_cert_date : 'No'} Basic CNC Wood Router - + Rabbit Laser {member.rabbit_cert_date ? 'Yes, ' + member.rabbit_cert_date : 'No'} Laser: Cutting and Engraving - + Trotec Laser {member.trotec_cert_date ? 'Yes, ' + member.trotec_cert_date : 'No'} Laser: Trotec Course - +