@@ -229,16 +229,6 @@ const MyGovernance: React.FC = () => {
229229 } , [ ] ) ;
230230
231231 const eraActivity = gov ?. eraActivity ;
232- const status : { label : GoverningStatus ; termId : string } = gov ?. rollup
233- ? {
234- label : gov . rollup . status ,
235- termId : governingStatusTermId ( gov . rollup . status ) ,
236- }
237- : governingStatusForProgress (
238- eraActivity ?. completed ?? 0 ,
239- eraActivity ?. required ?? 0 ,
240- ) ;
241-
242232 const timeLeftValue = useMemo ( ( ) => {
243233 const targetMs = clock ?. nextEraAt
244234 ? toTimestampMs ( clock . nextEraAt , NaN )
@@ -254,6 +244,37 @@ const MyGovernance: React.FC = () => {
254244 return chambers . filter ( ( chamber ) => gov . myChamberIds . includes ( chamber . id ) ) ;
255245 } , [ gov , chambers ] ) ;
256246
247+ if ( gov === null || chambers === null ) {
248+ return (
249+ < div className = "flex flex-col gap-6" >
250+ < PageHint pageId = "my-governance" />
251+ < Surface
252+ variant = "panelAlt"
253+ radius = "2xl"
254+ shadow = "tile"
255+ className = { cn (
256+ "px-5 py-4 text-sm text-muted" ,
257+ loadError ? "text-destructive" : undefined ,
258+ ) }
259+ >
260+ { loadError
261+ ? `My governance unavailable: ${ formatLoadError ( loadError ) } `
262+ : "Loading…" }
263+ </ Surface >
264+ </ div >
265+ ) ;
266+ }
267+
268+ const status : { label : GoverningStatus ; termId : string } = gov ?. rollup
269+ ? {
270+ label : gov . rollup . status ,
271+ termId : governingStatusTermId ( gov . rollup . status ) ,
272+ }
273+ : governingStatusForProgress (
274+ eraActivity ?. completed ?? 0 ,
275+ eraActivity ?. required ?? 0 ,
276+ ) ;
277+
257278 const tierProgress = gov ?. tier ?? null ;
258279 const currentTier = ( tierProgress ?. tier as TierKey | undefined ) ?? "Nominee" ;
259280 const nextTier = ( tierProgress ?. nextTier as TierKey | null ) ?? null ;
@@ -390,21 +411,6 @@ const MyGovernance: React.FC = () => {
390411 return (
391412 < div className = "flex flex-col gap-6" >
392413 < PageHint pageId = "my-governance" />
393- { gov === null || chambers === null ? (
394- < Surface
395- variant = "panelAlt"
396- radius = "2xl"
397- shadow = "tile"
398- className = { cn (
399- "px-5 py-4 text-sm text-muted" ,
400- loadError ? "text-destructive" : undefined ,
401- ) }
402- >
403- { loadError
404- ? `My governance unavailable: ${ formatLoadError ( loadError ) } `
405- : "Loading…" }
406- </ Surface >
407- ) : null }
408414 < Card >
409415 < CardHeader className = "pb-2" >
410416 < CardTitle >
@@ -414,6 +420,15 @@ const MyGovernance: React.FC = () => {
414420 </ CardTitle >
415421 </ CardHeader >
416422 < CardContent className = "space-y-4" >
423+ < Surface
424+ variant = "panelAlt"
425+ radius = "2xl"
426+ shadow = "tile"
427+ className = "px-4 py-3 text-sm text-muted"
428+ >
429+ This tracks opportunities that occurred during the current era, even
430+ if those votes are already closed.
431+ </ Surface >
417432 < div className = "grid gap-3 sm:grid-cols-2" >
418433 { [
419434 { label : "Era" , value : eraActivity ?. era ?? "—" } ,
@@ -443,11 +458,11 @@ const MyGovernance: React.FC = () => {
443458 key : "required" ,
444459 label : (
445460 < HintLabel termId = "governing_threshold" >
446- Required actions
461+ Era participation
447462 </ HintLabel >
448463 ) ,
449464 value : eraActivity
450- ? `${ eraActivity . completed } / ${ eraActivity . required } completed`
465+ ? `${ eraActivity . completed } / ${ eraActivity . required } completed this era `
451466 : "—" ,
452467 } ,
453468 {
@@ -480,7 +495,7 @@ const MyGovernance: React.FC = () => {
480495 className = "flex h-full flex-col items-center justify-center px-3 py-3 text-center"
481496 >
482497 < Kicker align = "center" className = "text-[0.7rem]" >
483- { act . label }
498+ { act . label } this era
484499 </ Kicker >
485500 < p className = "text-base font-semibold text-text" >
486501 { act . done } / { act . required }
@@ -552,7 +567,7 @@ const MyGovernance: React.FC = () => {
552567 ) ;
553568 return (
554569 < div key = { key } className = "space-y-2" >
555- < div className = "flex items-center justify-between gap-3" >
570+ < div className = "flex flex-col gap-1 sm:flex-row sm: items-center sm: justify-between sm: gap-3" >
556571 < p className = "text-sm font-semibold text-text" >
557572 { requirementLabel [ key ] }
558573 </ p >
@@ -595,7 +610,7 @@ const MyGovernance: React.FC = () => {
595610 return (
596611 < div
597612 key = { key }
598- className = "flex items-center justify-between gap-4 px-3 py-3"
613+ className = "flex flex-col gap-3 px-3 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4 "
599614 >
600615 < p className = "text-sm leading-snug font-semibold text-text" >
601616 { requirementLabel [ key ] }
@@ -769,7 +784,7 @@ const MyGovernance: React.FC = () => {
769784 shadow = "tile"
770785 className = "space-y-2 px-4 py-3"
771786 >
772- < div className = "flex items-center justify-between" >
787+ < div className = "flex flex-col gap-2 sm:flex-row sm: items-center sm: justify-between" >
773788 < p className = "text-sm font-semibold text-text" >
774789 { chamber . chamberTitle }
775790 </ p >
@@ -813,7 +828,7 @@ const MyGovernance: React.FC = () => {
813828 shadow = "tile"
814829 className = "space-y-3 p-4"
815830 >
816- < div className = "flex items-start justify-between gap-3 " >
831+ < div className = "flex flex-col gap-3 sm:flex-row sm: items-start sm: justify-between" >
817832 < div >
818833 < Kicker >
819834 { chamberLabel ( item . chamberId , chambers ) }
0 commit comments