add back ModeType to TopControls

This commit is contained in:
EthanHealy01 2025-08-22 14:59:18 +01:00
parent 1708a9b13b
commit 45d99777cc

View File

@ -74,13 +74,13 @@ const TopControls = ({
const mode = view as ModeType;
// Show immediate feedback
setSwitchingTo(mode);
setSwitchingTo(mode as ModeType);
// Defer the heavy view change to next frame so spinner can render
requestAnimationFrame(() => {
// Give the spinner one more frame to show
requestAnimationFrame(() => {
setCurrentView(mode);
setCurrentView(mode as ModeType);
// Clear the loading state after view change completes
setTimeout(() => setSwitchingTo(null), 300);