()
| 16 | }, []); |
| 17 | |
| 18 | const checkProStatus = async () => { |
| 19 | try { |
| 20 | const dbPath = await invoke<string>('get_db_path'); |
| 21 | const proEnabled = await invoke<boolean>('is_pro_enabled', { dbPath }); |
| 22 | setIsPro(proEnabled); |
| 23 | } catch (err) { |
| 24 | console.error('Failed to check Pro status:', err); |
| 25 | setIsPro(false); |
| 26 | } finally { |
| 27 | setLoading(false); |
| 28 | } |
| 29 | }; |
| 30 | |
| 31 | if (loading) { |
| 32 | return <div className="animate-pulse bg-gray-200 dark:bg-gray-700 rounded h-32" />; |