From 35d7616539df6c2c2f5e6318deb75444d95d8729 Mon Sep 17 00:00:00 2001 From: Cody O'Donnell Date: Tue, 16 Jul 2024 16:36:17 -0700 Subject: [PATCH] Fix flashing policy card --- src/features/account/UseAgreements.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/account/UseAgreements.tsx b/src/features/account/UseAgreements.tsx index b2167acd..8e65ce7c 100644 --- a/src/features/account/UseAgreements.tsx +++ b/src/features/account/UseAgreements.tsx @@ -70,10 +70,10 @@ const samplePolicies: Policy[] = [ * Content for the Use Agreements tab in the Account page */ export const UseAgreements: FC = () => { - const [policies, setPolicies] = useState(samplePolicies); + const currentPolicies = samplePolicies.filter((d) => d.isCurrent === true); + const [policies, setPolicies] = useState(currentPolicies); const [showExpired, setShowExpired] = useState(false); const [selectedPolicy, setSelectedPolicy] = useState(policies[0]); - const currentPolicies = samplePolicies.filter((d) => d.isCurrent === true); const handleChangeExpired = ( event: React.ChangeEvent,