Apre Tesseramento dal widget Completa profilo in home.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,8 @@ qui: sta in [ROADMAP.md](ROADMAP.md).
|
|||||||
|
|
||||||
- L’interruttore in Impostazioni non è più «Notifiche turno palloni»: iscrive il dispositivo
|
- L’interruttore in Impostazioni non è più «Notifiche turno palloni»: iscrive il dispositivo
|
||||||
a tutte le push (palloni, solleciti) e alle smart in app. Testo e docs aggiornati.
|
a tutte le push (palloni, solleciti) e alle smart in app. Testo e docs aggiornati.
|
||||||
|
- Il widget Home «Completa il tuo profilo» apre direttamente la tab Tesseramento
|
||||||
|
(`/profilo?tab=tesseramento`).
|
||||||
|
|
||||||
### Revisione dell'interfaccia: accessibilità, movimento, peso
|
### Revisione dell'interfaccia: accessibilità, movimento, peso
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ Viene mostrata una barra di avanzamento (esempio: _Profilo completato — 85%_),
|
|||||||
|
|
||||||
Quando tutte le sezioni sono complete il widget scompare automaticamente.
|
Quando tutte le sezioni sono complete il widget scompare automaticamente.
|
||||||
|
|
||||||
|
Il tap apre Profilo sulla sottosezione **Tesseramento** (`/profilo?tab=tesseramento`), non
|
||||||
|
sulla tab Stagione.
|
||||||
|
|
||||||
## Profilo
|
## Profilo
|
||||||
|
|
||||||
Il profilo viene suddiviso in sette aree.
|
Il profilo viene suddiviso in sette aree.
|
||||||
|
|||||||
@@ -409,7 +409,11 @@ export function CompletaProfilo({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Reveal indice={indice} className="px-5 pt-4">
|
<Reveal indice={indice} className="px-5 pt-4">
|
||||||
<Link to="/profilo" className="premi block rounded-3xl bg-card p-4 shadow-card">
|
<Link
|
||||||
|
to="/profilo"
|
||||||
|
search={{ tab: "tesseramento" }}
|
||||||
|
className="premi block rounded-3xl bg-card p-4 shadow-card"
|
||||||
|
>
|
||||||
<div className="flex items-center justify-between gap-3">
|
<div className="flex items-center justify-between gap-3">
|
||||||
<span className="font-display text-sm uppercase tracking-wide">
|
<span className="font-display text-sm uppercase tracking-wide">
|
||||||
Completa il tuo profilo
|
Completa il tuo profilo
|
||||||
|
|||||||
+15
-1
@@ -29,7 +29,18 @@ import { esci } from "@/lib/auth";
|
|||||||
import { useIsAdmin } from "@/lib/ruoli";
|
import { useIsAdmin } from "@/lib/ruoli";
|
||||||
import { Reveal } from "@/components/motion/Reveal";
|
import { Reveal } from "@/components/motion/Reveal";
|
||||||
|
|
||||||
|
const TAB_PROFILO = ["stagione", "badge", "tesseramento", "impostazioni"] as const;
|
||||||
|
type TabProfilo = (typeof TAB_PROFILO)[number];
|
||||||
|
|
||||||
|
function isTabProfilo(v: unknown): v is TabProfilo {
|
||||||
|
return typeof v === "string" && (TAB_PROFILO as readonly string[]).includes(v);
|
||||||
|
}
|
||||||
|
|
||||||
export const Route = createFileRoute("/profilo")({
|
export const Route = createFileRoute("/profilo")({
|
||||||
|
validateSearch: (search: Record<string, unknown>): { tab?: TabProfilo } => {
|
||||||
|
const tab = isTabProfilo(search["tab"]) ? search["tab"] : undefined;
|
||||||
|
return tab ? { tab } : {};
|
||||||
|
},
|
||||||
head: () => ({
|
head: () => ({
|
||||||
meta: [
|
meta: [
|
||||||
{ title: "Profilo giocatore — CrAPP" },
|
{ title: "Profilo giocatore — CrAPP" },
|
||||||
@@ -48,6 +59,8 @@ export const Route = createFileRoute("/profilo")({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function Profilo() {
|
function Profilo() {
|
||||||
|
const { tab } = Route.useSearch();
|
||||||
|
const tabIniziale = tab ?? "stagione";
|
||||||
const votiSocial = useVotiSocial();
|
const votiSocial = useVotiSocial();
|
||||||
const g = useIo();
|
const g = useIo();
|
||||||
const admin = useIsAdmin();
|
const admin = useIsAdmin();
|
||||||
@@ -178,7 +191,8 @@ function Profilo() {
|
|||||||
</Reveal>
|
</Reveal>
|
||||||
|
|
||||||
<BarraSottosezioni
|
<BarraSottosezioni
|
||||||
defaultId="stagione"
|
key={tabIniziale}
|
||||||
|
defaultId={tabIniziale}
|
||||||
voci={[
|
voci={[
|
||||||
{
|
{
|
||||||
id: "stagione",
|
id: "stagione",
|
||||||
|
|||||||
Reference in New Issue
Block a user