From 26704a2d5f8873f6bcf24f9214e263470b6d666a Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 3 Aug 2020 20:58:15 -0700 Subject: [PATCH] Clear reinstall messages when mounting; closes #2213 --- .../components/server/settings/ReinstallServerBox.tsx | 6 +++++- yarn.lock | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/scripts/components/server/settings/ReinstallServerBox.tsx b/resources/scripts/components/server/settings/ReinstallServerBox.tsx index eef96c16c..1b7b44de7 100644 --- a/resources/scripts/components/server/settings/ReinstallServerBox.tsx +++ b/resources/scripts/components/server/settings/ReinstallServerBox.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { ServerContext } from '@/state/server'; import TitledGreyBox from '@/components/elements/TitledGreyBox'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; @@ -37,6 +37,10 @@ export default () => { }); }; + useEffect(() => { + clearFlashes(); + }, []); + return (