feat: add product concept subtitle to radars
A Radar gains an optional Concept — a short subtitle naming the product and its typical performances, rendered under the title and wrapping to a balanced second line when long. Old radars default to an empty Concept on load.
This commit is contained in:
@@ -9,7 +9,9 @@ function loadAll(): Radar[] {
|
||||
const raw = localStorage.getItem(STORAGE_KEY)
|
||||
if (!raw) return []
|
||||
const parsed = JSON.parse(raw)
|
||||
return Array.isArray(parsed) ? parsed : []
|
||||
if (!Array.isArray(parsed)) return []
|
||||
// Default concept for radars saved before the field existed.
|
||||
return parsed.map((r: Radar) => ({ ...r, concept: r.concept ?? '' }))
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
@@ -80,6 +82,7 @@ export function useRadars() {
|
||||
const radar: Radar = {
|
||||
id: uid(),
|
||||
name,
|
||||
concept: '',
|
||||
criteria,
|
||||
profiles,
|
||||
scores: {},
|
||||
|
||||
Reference in New Issue
Block a user