Skip to content

Commit

Permalink
remove leftover code
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Mar 11, 2024
1 parent 88a1a3b commit 3c77ddd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions app/javascript/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ export default function App() {

// useEffect hook for running notify maintenance banner on page load
useEffect(() => {
// set a cookie for a day after maintenance banner dismissed
const maintenanceClosedAt = localStorage.getItem('maintenanceClosedAt');
const now = new Date();
const oneDayInMilliseconds = 24 * 60 * 60 * 1000;

if (maintenanceBanner.data && (!maintenanceClosedAt || now.getTime() - new Date(maintenanceClosedAt).getTime() > oneDayInMilliseconds)) {
if (maintenanceBanner.data) {
const toastId = toast.info(maintenanceBanner.data, {
position: 'top-center',
autoClose: false,
Expand Down

0 comments on commit 3c77ddd

Please sign in to comment.