Simplify arrow function syntax and remove unnecessary whitespace across composable utilities

This commit is contained in:
2026-01-28 19:50:05 +00:00
parent 07c4379d81
commit 1ad9389318
4 changed files with 11 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ export function useLocalStorage(key, defaultValue) {
// Watch for changes and save to localStorage
watch(
storedValue,
(newValue) => {
newValue => {
try {
localStorage.setItem(key, JSON.stringify(newValue));
} catch (error) {
@@ -52,7 +52,7 @@ export function useLocalStorage(key, defaultValue) {
export function useSearchHistory(key = 'searchHistory', maxItems = 5) {
const history = useLocalStorage(key, []);
const addToHistory = (query) => {
const addToHistory = query => {
if (!query || query.trim() === '') return;
// Remove duplicates and add to front
@@ -64,7 +64,7 @@ export function useSearchHistory(key = 'searchHistory', maxItems = 5) {
history.value = newHistory;
};
const removeFromHistory = (query) => {
const removeFromHistory = query => {
history.value = history.value.filter(item => item !== query);
};