File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,11 @@ export default function HomePage() {
8383 const kudosStyle = birthdays . length == 0 &&
8484 anniversaries . length == 0 ? { } : { width : '450px' } ;
8585
86+ // Determine the X position of the birthday confetti. If there aren't any
87+ // anniversaries, it will be the left side. If there are anniversaries, we
88+ // need it in the middle. Confetti X position ranges from 0 to 1.
89+ const xPos = anniversaries . length > 0 ? .5 : .25 ;
90+
8691 return (
8792 < div className = "home-page" >
8893 < div className = "celebrations" >
@@ -95,13 +100,13 @@ export default function HomePage() {
95100 />
96101 ) : (
97102 < Grid container spacing = { 2 } style = { { padding : '0 20px 0 20px' } } >
98- { anniversaries . length > 0 && (
103+ { anniversaries . length > 0 && (
99104 < Grid item >
100105 < Anniversaries anniversaries = { anniversaries } />
101106 </ Grid > ) }
102107 { birthdays . length > 0 && (
103108 < Grid item >
104- < Birthdays birthdays = { birthdays } />
109+ < Birthdays birthdays = { birthdays } xPos = { xPos } />
105110 </ Grid > ) }
106111 < Grid item style = { kudosStyle } >
107112 < PublicKudos />
You can’t perform that action at this time.
0 commit comments