File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 22 import ArtistList from " $lib/comp/ArtistList.svelte" ;
33 import PageContainer from " $lib/comp/PageContainer.svelte" ;
44 import SongList from " $lib/comp/SongList.svelte" ;
5- import SongView from " $lib/comp/SongView.svelte" ;
65 import LinkButton from " $lib/LinkButton.svelte" ;
76 import type { Stats } from " $lib/stats" ;
87
98 export let stats: Stats ;
9+ export let onClose: () => any = () => console .warn (" onClose not set" )
1010
1111 let currentPage = 0 ;
1212 const pageCount = 4 ;
7272 <h1 >That's all, see you again!</h1 >
7373
7474 <div style =" text-align: center;" >
75- <LinkButton text =" Home page" />
75+ <LinkButton text ="Home page" onClick ={ onClose } />
7676 </div >
7777 {/ snippet }
7878
Original file line number Diff line number Diff line change 77
88 let currentStats: Stats | null = null ;
99
10- function setStats(stats : Stats ) {
10+ function setStats(stats : Stats | null ) {
1111 currentStats = stats ;
1212 }
1313 </script >
1414
1515<Page >
1616 {#if currentStats }
17- <StatsView stats ={currentStats } />
17+ <StatsView stats ={currentStats } onClose ={() => setStats ( null )} />
1818 {:else }
1919 <Home setStats ={setStats }/>
2020 {/if }
You can’t perform that action at this time.
0 commit comments