Formular und Liste responsiv gestalten
Eingabemaske als CSS-Grid statt starrer Tabelle, damit sie auf dem Smartphone vollständig sichtbar bleibt (2/4/8 Spalten je nach Breite). Einträge-Liste zeigt unterhalb von 768px eine zweizeilige Kartenansicht statt der breiten Tabelle. Anzahl geladener Einträge von 15 auf 5 reduziert. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ import WerteList from '@/components/WerteList';
|
||||
import { WerteEntry } from '@/types/werte';
|
||||
import TabLayout from '@/components/TabLayout';
|
||||
|
||||
const MAX_ENTRIES = 15
|
||||
const MAX_ENTRIES = 5
|
||||
|
||||
export default function Home() {
|
||||
const [entries, setEntries] = useState<WerteEntry[]>([]);
|
||||
@@ -45,7 +45,7 @@ export default function Home() {
|
||||
|
||||
const refreshEntries = async () => {
|
||||
try {
|
||||
const response = await fetch('/api/werte?limit=14', {
|
||||
const response = await fetch(`/api/werte?limit=${MAX_ENTRIES}`, {
|
||||
cache: 'no-store',
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache',
|
||||
|
||||
Reference in New Issue
Block a user