diff --git a/components/update-banner.tsx b/components/update-banner.tsx index d9ac9a5..10a45da 100644 --- a/components/update-banner.tsx +++ b/components/update-banner.tsx @@ -1,13 +1,14 @@ 'use client' import { useState, useEffect, useCallback } from 'react' -import { RefreshCw } from 'lucide-react' +import { RefreshCw, Download } from 'lucide-react' const CHECK_INTERVAL = 60_000 // check every 60s export function UpdateBanner() { const [updateAvailable, setUpdateAvailable] = useState(false) const [initialVersion, setInitialVersion] = useState(null) + const [updating, setUpdating] = useState(false) const checkVersion = useCallback(async () => { try { @@ -42,13 +43,37 @@ export function UpdateBanner() { if (!updateAvailable) return null + const handleUpdate = () => { + setUpdating(true) + window.location.reload() + } + return ( - +
+
+
+
+ +
+
+

+ Update Available +

+

+ A new version of Jefflix has been deployed +

+
+
+ + +
+
) }