File tree Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ const Routes = () => {
2525 < Router >
2626 { /* Setup */ }
2727 < Route path = { [ 'Setup.Startup' , 'Setup.ValidateSetup' ] } >
28- < LoadingPage text = "Launching..." />
28+ < LoadingPage text = "Launching..." processes = { context . processes } />
2929 </ Route >
3030 < Route path = "Setup.Start" >
3131 < StartPage send = { send } context = { context } />
3232 </ Route >
3333 < Route path = { [ 'Setup.LoadTutorialSummary' , 'Setup.LoadTutorialData' , 'Setup.SetupNewTutorial' ] } >
34- < LoadingPage text = "Loading Tutorial..." />
34+ < LoadingPage text = "Loading Tutorial..." processes = { context . processes } /> ]
3535 </ Route >
3636 < Route path = "Setup.SelectTutorial" >
3737 < SelectTutorialPage send = { send } context = { context } />
@@ -41,7 +41,7 @@ const Routes = () => {
4141 </ Route >
4242 { /* Tutorial */ }
4343 < Route path = { [ 'Tutorial.LoadNext' , 'Tutorial.Level.Load' ] } >
44- < LoadingPage text = "Loading Level..." />
44+ < LoadingPage text = "Loading Level..." processes = { context . processes } />
4545 </ Route >
4646 < Route path = "Tutorial.Level" >
4747 < LevelSummaryPage send = { send } context = { context } />
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ import { Loading } from '@alifd/next'
22import * as React from 'react'
33
44interface Props {
5- text : string
5+ message : string
66}
77
8- const LoadingComponent = ( { text } : Props ) => {
9- return < Loading tip = { text } />
8+ const LoadingComponent = ( { message } : Props ) => {
9+ return < Loading tip = { message } />
1010}
1111
1212export default LoadingComponent
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const styles = {
2222const LoadingPage = ( { text } : Props ) => {
2323 return (
2424 < div css = { styles . page } >
25- < Loading text = { text } />
25+ < Loading message = { text } />
2626 </ div >
2727 )
2828}
Original file line number Diff line number Diff line change @@ -2,11 +2,10 @@ import * as React from 'react'
22import * as T from 'typings'
33import { css , jsx } from '@emotion/core'
44import Loading from '../../components/Loading'
5- import Message from '../../components/Message'
65
76interface Props {
87 text : string
9- context ?: T . MachineContext
8+ processes ?: T . ProcessEvent [ ]
109}
1110
1211const styles = {
@@ -20,7 +19,7 @@ const styles = {
2019 } ,
2120}
2221
23- const LoadingPage = ( { text } : Props ) => {
22+ const LoadingPage = ( { text, processes } : Props ) => {
2423 const [ showLoading , setShowHiding ] = React . useState ( false )
2524
2625 React . useEffect ( ( ) => {
@@ -38,9 +37,11 @@ const LoadingPage = ({ text }: Props) => {
3837 return null
3938 }
4039
40+ const message : string = processes && processes . length ? processes [ 0 ] . title : text
41+
4142 return (
4243 < div css = { styles . page } >
43- < Loading text = { text } />
44+ < Loading message = { message } />
4445 </ div >
4546 )
4647}
Original file line number Diff line number Diff line change 11import * as React from 'react'
22import useFetch from '../../services/hooks/useFetch'
33import * as TT from 'typings/tutorial'
4- import Loading from '../Loading'
4+ import LoadingPage from '../Loading'
55
66interface Props {
77 url : string
@@ -11,7 +11,7 @@ interface Props {
1111const LoadTutorialSummary = ( props : Props ) => {
1212 const { data, error, loading } = useFetch < TT . Tutorial > ( props . url )
1313 if ( loading ) {
14- return < Loading text = "Loading tutorial summary..." />
14+ return < LoadingPage text = "Loading tutorial summary..." />
1515 }
1616 if ( error ) {
1717 console . log ( `Failed to load tutorial summary: ${ error } ` )
You can’t perform that action at this time.
0 commit comments