You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplifies Crops component by using precomputed achievement data and updates its props. Refactors crop achievement calculation in Utility.tsx to centralize logic, add maxMono and achievement flags, and improve maintainability.
let_monocultureText=_monocultureAchieved ? "You already have the 'Monoculture' Achievement" : `You've shipped ${maxShipped.name} the most and you require ${300-maxShipped.times} more of it to get the 'Monoculture' Achievement`;
53
-
let_polycultureText=_polycultureAchieved ? "You already have the 'Polyculture' Achievement" : `You need to ship ${15-_totalShipped} more crops to get the 'Polyculture' achievement`;
let_monocultureText=cropsShipped.cropsShipped.hasMonoculture ? "You already have the 'Monoculture' Achievement" : `You've shipped ${cropsShipped.cropsShipped.maxMono?.name} the most and you require ${300-cropsShipped.cropsShipped.maxMono?.shipped} more of it to get the 'Monoculture' Achievement`;
11
+
let_polycultureText=cropsShipped.cropsShipped.hasPolyculture ? "You already have the 'Polyculture' Achievement" : `You need to ship 15 crops for each polyculture crop to get the 'Polyculture' achievement`;
12
+
55
13
return(
56
14
<divclassName="progress-container">
57
-
<spanclassName="a-title"><h1>{_monocultureAchieved ? `You've shipped ${maxShipped.name} the most and you require ${300-maxShipped.times} more of it to get the 'Monoculture' Achievement` : <spanclassName="completed">`You already have the 'Monoculture' Achievement`</span>}</h1></span>
15
+
{/* <span className="a-title"><h1>{_monocultureAchieved ? `You've shipped ${ maxShipped.name } the most and you require ${300 - maxShipped.times} more of it to get the 'Monoculture' Achievement` : <span className="completed">`You already have the 'Monoculture' Achievement`</span> }</h1></span> */}
0 commit comments