remove confusing info box from settings location section
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,16 +12,6 @@ import { useCallback, useEffect, useState } from "react"
|
||||
import { type GeoResult, clearGeoCache, detectFromCoords, loadCachedResult } from "../../location/lib/geo"
|
||||
import { NotificationGuide } from "./notification-guide"
|
||||
|
||||
function formatCacheAge(cachedAt: number): string {
|
||||
const minutes = Math.floor((Date.now() - cachedAt) / 60_000)
|
||||
if (minutes < 1) return "gerade eben"
|
||||
if (minutes < 60) return `vor ${minutes} Min.`
|
||||
const hours = Math.floor(minutes / 60)
|
||||
if (hours < 24) return `vor ${hours} Std.`
|
||||
const days = Math.floor(hours / 24)
|
||||
return `vor ${days} T.`
|
||||
}
|
||||
|
||||
function isStandalone(): boolean {
|
||||
if (typeof window === "undefined") return false
|
||||
return (
|
||||
@@ -161,32 +151,6 @@ export function SettingsPage() {
|
||||
{/* --- Location --- */}
|
||||
<section>
|
||||
<h2 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-2">Standort</h2>
|
||||
{hasLocation && result.bundesland ? (
|
||||
<Card className="py-0 gap-0 mb-3">
|
||||
<CardContent className="p-0 divide-y divide-border">
|
||||
<div className="flex justify-between px-4 py-3">
|
||||
<span className="text-sm">Bundesland</span>
|
||||
<span className="text-sm text-muted-foreground">{result.bundesland}</span>
|
||||
</div>
|
||||
{result.landtag_label && (
|
||||
<div className="flex justify-between px-4 py-3">
|
||||
<span className="text-sm">Landtag</span>
|
||||
<span className="text-sm text-muted-foreground">{result.landtag_label}</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex justify-between px-4 py-3">
|
||||
<span className="text-sm">Abgeordnete geladen</span>
|
||||
<span className="text-sm text-muted-foreground">{result.mandates.length}</span>
|
||||
</div>
|
||||
{result.cachedAt && (
|
||||
<div className="flex justify-between px-4 py-3">
|
||||
<span className="text-sm">Zwischengespeichert</span>
|
||||
<span className="text-sm text-muted-foreground">{formatCacheAge(result.cachedAt)}</span>
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
) : null}
|
||||
|
||||
{loading && (
|
||||
<div className="flex items-center justify-center h-16 mb-3">
|
||||
|
||||
Reference in New Issue
Block a user