React/TypeScript/Vite/Tailwind prototype from the design session (login, dashboard, photos, backups, settings views with mocked API layer). Infra work (Rust services, Ansible, OpenTofu) follows in subsequent commits. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
11 lines
320 B
TypeScript
11 lines
320 B
TypeScript
import { useEffect, useState } from 'react';
|
|
import { getBackups } from '../api/backups';
|
|
import type { BackupDevice } from '../types';
|
|
|
|
export function useBackups() {
|
|
const [backups, setBackups] = useState<BackupDevice[]>([]);
|
|
useEffect(() => {
|
|
void getBackups().then(setBackups);
|
|
}, []);
|
|
return backups;
|
|
}
|