mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-13 11:06:40 +07:00
Initial public release
Aurum — a self-hosted personal finance operating system: cash flow, net worth tracking, budgets, goals, recurring payments, reports, proactive alerts, and a compound-interest returns calculator, all bilingual (RU/EN) and mobile-first. Ships as a three-container Docker Compose stack (Postgres + FastAPI + nginx-served React frontend). See README.md for setup and CONTRIBUTING.md for development.
This commit is contained in:
34
frontend/src/components/settings/CurrencyCard.tsx
Normal file
34
frontend/src/components/settings/CurrencyCard.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card";
|
||||
import { Select } from "@/components/ui/Input";
|
||||
import { useTranslation } from "@/lib/i18n";
|
||||
import { CURRENCIES, getCurrencyLabel } from "@/lib/currency";
|
||||
import { useAppSettings, useUpdateAppSettings } from "@/hooks/useSettings";
|
||||
|
||||
export function CurrencyCard() {
|
||||
const { t, language } = useTranslation();
|
||||
const { data: settings, isLoading } = useAppSettings();
|
||||
const updateSettings = useUpdateAppSettings();
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>{t("settings.currency")}</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-2">
|
||||
<Select
|
||||
value={settings?.currency ?? ""}
|
||||
disabled={isLoading || updateSettings.isPending}
|
||||
onChange={(event) => updateSettings.mutate({ currency: event.target.value })}
|
||||
className="max-w-xs"
|
||||
>
|
||||
{CURRENCIES.map((currency) => (
|
||||
<option key={currency.code} value={currency.code}>
|
||||
{getCurrencyLabel(currency.code, language)}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
<p className="text-xs text-text-muted">{t("settings.currencyHint")}</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user