Fix type errors in sync settings
This commit addresses several TypeScript errors in the sync settings component and related utility functions. It corrects type definitions for the sync result, ensures correct usage of the `setLastSyncTime` function, and fixes toast variants.
This commit is contained in:
@@ -13,11 +13,12 @@ export const getLastSyncTime = (): string | null => {
|
||||
|
||||
/**
|
||||
* 마지막 동기화 시간 설정
|
||||
* @param customValue 설정할 특정 값 (옵션)
|
||||
*/
|
||||
export const setLastSyncTime = (): void => {
|
||||
export const setLastSyncTime = (customValue?: string): void => {
|
||||
try {
|
||||
const now = new Date().toISOString();
|
||||
localStorage.setItem('lastSyncTime', now);
|
||||
const value = customValue || new Date().toISOString();
|
||||
localStorage.setItem('lastSyncTime', value);
|
||||
} catch (error) {
|
||||
console.error('마지막 동기화 시간 업데이트 중 오류:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user