Skip to content

Commit a6a4980

Browse files
committed
feat: reload page.
1 parent 9b23a38 commit a6a4980

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/components/CommandPalette.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ const CommandPalette = ({ isOpen, setIsOpen, openGenericModal, toggleDigitalRain
166166
localStorage.clear();
167167
addToast({ title: 'Success', message: 'Local storage cleared!', duration: 3000 });
168168
break;
169+
case 'reloadPage':
170+
addToast({ title: 'Reloading', message: 'Page will reload shortly...', duration: 1500 });
171+
setTimeout(() => window.location.reload(), 1500);
172+
break;
169173
default:
170174
break;
171175
}

src/hooks/useSearchableData.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const useSearchableData = () => {
8383
{ title: 'Show User/Browser Information', type: 'command', commandId: 'showOSInfo' },
8484
{ title: 'Copy Current URL', type: 'command', commandId: 'copyCurrentURL' },
8585
{ title: 'Clear Local Storage', type: 'command', commandId: 'clearLocalStorage' },
86+
{ title: 'Reload Page', type: 'command', commandId: 'reloadPage' },
8687
{ title: 'Her Daim', type: 'command', commandId: 'herDaim' },
8788
];
8889

0 commit comments

Comments
 (0)