mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-26 01:37:19 +00:00
Simplify clearance mode switching animation and toasts
Remove unnecessary setTimeout calls for clearance mode switching and toast notifications in the AeThexOS component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 279f1558-c0e3-40e4-8217-be7e9f4c6eca Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 21cc4729-4694-409c-8f3d-e946b1d61bfb Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/b984cb14-1d19-4944-922b-bc79e821ed35/279f1558-c0e3-40e4-8217-be7e9f4c6eca/rpkLa5R Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
ce8b6b7c28
commit
b2aa09e481
1 changed files with 2 additions and 9 deletions
|
|
@ -205,16 +205,9 @@ export default function AeThexOS() {
|
||||||
|
|
||||||
const switchClearance = useCallback(() => {
|
const switchClearance = useCallback(() => {
|
||||||
const newMode: ClearanceMode = clearanceMode === 'foundation' ? 'corp' : 'foundation';
|
const newMode: ClearanceMode = clearanceMode === 'foundation' ? 'corp' : 'foundation';
|
||||||
setIsSwitchingClearance(true);
|
|
||||||
setShowStartMenu(false);
|
setShowStartMenu(false);
|
||||||
|
setClearanceMode(newMode);
|
||||||
setTimeout(() => {
|
addToast(`Switched to ${CLEARANCE_THEMES[newMode].name}`, 'success');
|
||||||
setClearanceMode(newMode);
|
|
||||||
setTimeout(() => {
|
|
||||||
setIsSwitchingClearance(false);
|
|
||||||
addToast(`Switched to ${CLEARANCE_THEMES[newMode].name}`, 'success');
|
|
||||||
}, 800);
|
|
||||||
}, 600);
|
|
||||||
}, [clearanceMode, addToast]);
|
}, [clearanceMode, addToast]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue