File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
app/[locale]/10years/_components/TorchHistorySwiper Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,22 @@ type TorchHistorySwiperProps = {
19
19
currentHolderAddress : Address | null
20
20
}
21
21
22
+ const getOrdinalSuffix = ( num : number ) : string => {
23
+ const pr = new Intl . PluralRules ( "en" , { type : "ordinal" } )
24
+ const rule = pr . select ( num )
25
+
26
+ switch ( rule ) {
27
+ case "one" :
28
+ return `${ num } st`
29
+ case "two" :
30
+ return `${ num } nd`
31
+ case "few" :
32
+ return `${ num } rd`
33
+ default :
34
+ return `${ num } th`
35
+ }
36
+ }
37
+
22
38
const TorchHistorySwiper = ( {
23
39
holders,
24
40
currentHolderAddress,
@@ -40,8 +56,8 @@ const TorchHistorySwiper = ({
40
56
// Create placeholder for future holder
41
57
return {
42
58
address : `placeholder-${ index } ` as Address ,
43
- name : `Future Bearer ${ index + 1 } ` ,
44
- role : " Coming soon..." ,
59
+ name : `Torchbearer ${ index + 1 } ` ,
60
+ role : ` Coming July ${ getOrdinalSuffix ( 20 + index ) } !` ,
45
61
twitter : "" ,
46
62
event : {
47
63
from : "0x0000000000000000000000000000000000000000" as Address ,
You can’t perform that action at this time.
0 commit comments