File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed
Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,10 @@ export function SongSearchPanel(props: {
274274
275275 const results =
276276 ! queryTooShort && ! requiresCoreSearchTerm ? ( data ?. results ?? [ ] ) : [ ] ;
277+ const resolvedInfoNote = props . infoNote ?. replace (
278+ "{count}" ,
279+ String ( data ?. total ?? 0 )
280+ ) ;
277281 const totalPages = Math . max (
278282 1 ,
279283 Math . ceil ( ( data ?. total ?? 0 ) / ( data ?. pageSize ?? 25 ) )
@@ -441,12 +445,12 @@ export function SongSearchPanel(props: {
441445 { props . description }
442446 </ p >
443447 ) : null }
444- { props . infoNote ? (
448+ { resolvedInfoNote ? (
445449 < div className = "mt-4 rounded-[20px] border border-sky-400/30 bg-sky-500/10 px-4 py-3 text-sm text-sky-100" >
446450 < p className = "font-semibold uppercase tracking-[0.18em] text-sky-200" >
447451 Note:
448452 </ p >
449- < p className = "mt-2" > { props . infoNote } </ p >
453+ < p className = "mt-2" > { resolvedInfoNote } </ p >
450454 </ div >
451455 ) : null }
452456 </ div >
Original file line number Diff line number Diff line change @@ -206,6 +206,12 @@ function PublicChannelPage() {
206206 </ div >
207207 </ div >
208208
209+ < SongSearchPanel
210+ title = "Search to add a song"
211+ description = "Copy the request command and use it in Twitch chat."
212+ placeholder = { `Search songs for ${ channelDisplayName } ` }
213+ />
214+
209215 < Card >
210216 < CardHeader className = "flex flex-row items-center justify-between gap-4" >
211217 < div className = "flex items-center gap-3" >
@@ -302,12 +308,6 @@ function PublicChannelPage() {
302308 </ CardContent >
303309 ) : null }
304310 </ Card >
305-
306- < SongSearchPanel
307- title = "Search to add a song"
308- description = "Copy the request command and use it in Twitch chat."
309- placeholder = { `Search songs for ${ channelDisplayName } ` }
310- />
311311 </ section >
312312 ) ;
313313}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function SearchPage() {
1515 < SongSearchPanel
1616 eyebrow = "Search"
1717 title = "Songs"
18- infoNote = "This demo only contains 50 songs."
18+ infoNote = "This demo only contains {count} songs."
1919 placeholder = "Search by song title, artist or album"
2020 />
2121 ) ;
You can’t perform that action at this time.
0 commit comments