Phase 1: Infrastructure setup - Install next-intl and create basic i18n structure
- Install next-intl package - Create LanguageProvider hook with localStorage persistence - Create IntlProvider component for next-intl integration - Create Providers wrapper component - Update layout.tsx to include providers and set default lang to 'es' - Create initial translation files (common.json) for es, en, ca - Fix pre-existing TypeScript errors in various pages All tests passing, build successful.
This commit is contained in:
parent
1a47b3643f
commit
f7553df05d
15 changed files with 940 additions and 22 deletions
|
|
@ -63,7 +63,7 @@ export default function AdminPriceHistoryPage() {
|
|||
<div style={styles.tableHeader}>
|
||||
<h2 style={styles.tableTitle}>Bitcoin Price History</h2>
|
||||
<div style={styles.headerActions}>
|
||||
<span style={styles.totalCount}>{records.length} records</span>
|
||||
<span style={styles.totalCount}>{records?.length ?? 0} records</span>
|
||||
<button onClick={fetchRecords} style={styles.refreshBtn} disabled={isLoadingData}>
|
||||
Refresh
|
||||
</button>
|
||||
|
|
@ -98,7 +98,7 @@ export default function AdminPriceHistoryPage() {
|
|||
</td>
|
||||
</tr>
|
||||
)}
|
||||
{!error && !isLoadingData && records.length === 0 && (
|
||||
{!error && !isLoadingData && (records?.length ?? 0) === 0 && (
|
||||
<tr>
|
||||
<td colSpan={4} style={styles.emptyRow}>
|
||||
No price records yet. Click "Fetch Now" to get the current price.
|
||||
|
|
@ -107,7 +107,7 @@ export default function AdminPriceHistoryPage() {
|
|||
)}
|
||||
{!error &&
|
||||
!isLoadingData &&
|
||||
records.map((record) => (
|
||||
(records ?? []).map((record) => (
|
||||
<tr key={record.id} style={styles.tr}>
|
||||
<td style={styles.td}>{record.source}</td>
|
||||
<td style={styles.td}>{record.pair}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue