diff --git a/src/app/page.tsx b/src/app/page.tsx
index d406c74..1a1c60b 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -7,6 +7,7 @@ import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '
import { Input } from '@/components/ui/input'
import { Card } from '@/components/ui/card'
import { RecurrencePicker } from '@/components/recurrence-picker'
+import { IcsFilePicker } from '@/components/ics-file-picker'
import { addEvent, deleteEvent, getAllEvents, clearEvents, getDB } from '@/lib/db'
import { parseICS, generateICS } from '@/lib/ical'
@@ -248,18 +249,13 @@ export default function HomePage() {
{/* Control Toolbar */}
+ Import .ics
{events.length > 0 && (
<>
>
)}
-
{/* Event List */}
diff --git a/src/components/ics-file-picker.tsx b/src/components/ics-file-picker.tsx
new file mode 100644
index 0000000..f0789f3
--- /dev/null
+++ b/src/components/ics-file-picker.tsx
@@ -0,0 +1,58 @@
+"use client"
+
+import type React from "react"
+
+import { useRef } from "react"
+import { Button } from "@/components/ui/button"
+import { Calendar } from "lucide-react"
+
+interface IcsFilePickerProps {
+ onFileSelect?: (file: File) => void
+ className?: string
+ children?: React.ReactNode
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link"
+ size?: "default" | "sm" | "lg" | "icon"
+}
+
+export function IcsFilePicker({
+ onFileSelect,
+ className,
+ children,
+ variant = "default",
+ size = "default",
+}: IcsFilePickerProps) {
+ const fileInputRef = useRef(null)
+
+ const handleButtonClick = () => {
+ fileInputRef.current?.click()
+ }
+
+ const handleFileChange = (event: React.ChangeEvent) => {
+ const file = event.target.files?.[0]
+ if (file && onFileSelect) {
+ onFileSelect(file)
+ }
+ }
+
+ return (
+ <>
+
+
+ >
+ )
+}
+