From 5a5cdba2a12a0d77c2a97a2548ef65499ec7128c Mon Sep 17 00:00:00 2001 From: Spicer Matthews Date: Thu, 10 Oct 2024 21:45:42 -0700 Subject: [PATCH] Made it so we can reload on notification. --- package.json | 2 +- src/components/notification/Notification.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0890c584..f6b1fed6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "go": "yarn run dev", "dev": "NODE_ENV=development next dev --port 3001", - "build": "NODE_ENV=production yarn run relay && next build", + "build": "NODE_ENV=test yarn run test && NODE_ENV=production yarn run relay && next build", "start": "NODE_ENV=production next start --port 3001", "test": "yarn run relay && yarn run lint && yarn run jest --testPathIgnorePatterns=e2e -w 1", "test:e2e": "dotenv-extended --defaults=./.env --path=./.env.local yarn run jest e2e-tests.test.js", diff --git a/src/components/notification/Notification.js b/src/components/notification/Notification.js index 4d83cf11..3ad2bb08 100644 --- a/src/components/notification/Notification.js +++ b/src/components/notification/Notification.js @@ -113,6 +113,12 @@ const Notification = ({ slot, user, onOpenLeaderboard }) => { } break + // Reload the entire page. + case 'reload-page': + // eslint-disable-next-line no-undef + window.location.reload() + break + // Default do nothing default: break