Refactor SyncSettings component
Refactor SyncSettings component into smaller components and extract logic into a separate hook.
This commit is contained in:
25
src/components/sync/SyncExplanation.tsx
Normal file
25
src/components/sync/SyncExplanation.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
import { AlertCircle } from "lucide-react";
|
||||
|
||||
interface SyncExplanationProps {
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
const SyncExplanation: React.FC<SyncExplanationProps> = ({ enabled }) => {
|
||||
if (!enabled) return null;
|
||||
|
||||
return (
|
||||
<Alert className="bg-amber-50 text-amber-800 border-amber-200">
|
||||
<AlertCircle className="h-4 w-4" />
|
||||
<AlertTitle>동기화 작동 방식</AlertTitle>
|
||||
<AlertDescription className="text-sm">
|
||||
이 기능은 양방향 동기화입니다. 로그인 후 동기화를 켜면 서버 데이터와 로컬 데이터가 병합됩니다.
|
||||
데이터 초기화 후에도 동기화 버튼을 누르면 서버에 저장된 데이터를 다시 불러옵니다.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
);
|
||||
};
|
||||
|
||||
export default SyncExplanation;
|
||||
Reference in New Issue
Block a user