@@ -79,7 +72,7 @@ async function CartridgeScoreboard({cartridge_id, reload, replay_function}:{
{scoreInfo.score.toLocaleString()}
-
+
|
);
@@ -94,11 +87,12 @@ async function CartridgeScoreboard({cartridge_id, reload, replay_function}:{
//export default CartridgeScoreboard;
-const notRender = (prevProps:{cartridge_id:string, reload:boolean}, nextProps:{cartridge_id:string, reload:boolean}) => {
- if ((prevProps.cartridge_id !== nextProps.cartridge_id) || nextProps.reload) {
- return false // will re-render
+const arePropsEqual = (prevProps:{cartridge_id:string, reload:number}, nextProps:{cartridge_id:string, reload:number}) => {
+ // change cartridge || log validated reload or reload btn
+ if ((prevProps.cartridge_id !== nextProps.cartridge_id) || (prevProps.reload !== nextProps.reload)) {
+ return false // will re-render
}
return true // donot re-render
}
-export default React.memo(CartridgeScoreboard, notRender)
\ No newline at end of file
+export default React.memo(CartridgeScoreboard, arePropsEqual)
\ No newline at end of file
diff --git a/frontend/app/globals.css b/frontend/app/globals.css
index 9e17906..35631d7 100644
--- a/frontend/app/globals.css
+++ b/frontend/app/globals.css
@@ -346,6 +346,10 @@ body {
@apply text-[var(--foreground-rgb-muted)];
}
+
+ .scoreboard-btn {
+ @apply hover:text-[var(--highlight-text-end-hex)];
+ }
/* .leaderboard-card {
@apply p-2 bg-[rgb(var(--background-start-rgb))] mb-3 rounded-md transition delay-150 duration-300 ease-in-out hover:scale-105;
} */
diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx
index 34df55e..601282b 100644
--- a/frontend/app/page.tsx
+++ b/frontend/app/page.tsx
@@ -17,7 +17,7 @@ export default function Home() {
-
+