@@ -4,7 +4,7 @@ import * as CR from 'typings'
44import { useQuery } from '@apollo/react-hooks'
55
66import queryTutorial from '../../services/apollo/queries/tutorial'
7- import Summary from './Summary '
7+ import OverviewPage from './OverviewPage '
88import ErrorView from '../../components/Error'
99
1010interface PageProps {
@@ -21,14 +21,14 @@ interface TutorialDataVariables {
2121version :string
2222}
2323
24- const SummaryPage = ( props :PageProps ) => {
24+ const Overview = ( props :PageProps ) => {
2525const { tutorial} = props . context
2626
2727if ( ! tutorial ) {
2828throw new Error ( 'Tutorial not found in summary page' )
2929}
3030const { loading, error, data} = useQuery < TutorialData , TutorialDataVariables > ( queryTutorial , {
31- fetchPolicy :'network-only' , //for debugging purposes
31+ fetchPolicy :'network-only' , //to ensure latest
3232variables :{
3333tutorialId :tutorial . id ,
3434version :tutorial . version . version ,
@@ -56,8 +56,9 @@ const SummaryPage = (props: PageProps) => {
5656} )
5757
5858const { title, description} = data . tutorial . version . summary
59+ const { levels} = data . tutorial . version . data
5960
60- return < Summary title = { title } description = { description } onNext = { onNext } />
61+ return < OverviewPage title = { title } description = { description } levels = { levels } onNext = { onNext } />
6162}
6263
63- export default SummaryPage
64+ export default Overview