11import * as React from 'react'
22import * as T from 'typings'
3+ import { Button , Icon } from '@alifd/next'
34import Step from '../components/Step'
45import Hints from '../components/Hints'
56import Content from '../components/Content'
@@ -40,12 +41,19 @@ const styles = {
4041 steps : {
4142 padding : '1rem 1rem' ,
4243 } ,
44+ adminNav : {
45+ position : 'absolute' as 'absolute' ,
46+ right : '1rem' ,
47+ lineHeight : '16px' ,
48+ } ,
4349}
4450
4551const ReviewPage = ( props : Props ) => {
46- const { state : adminState } = React . useContext ( AdminContext )
52+ const {
53+ state : { adminMode } ,
54+ } = React . useContext ( AdminContext )
4755 const show = ( status : T . ProgressStatus ) : boolean => {
48- return adminState . adminMode || status !== 'INCOMPLETE'
56+ return adminMode || status !== 'INCOMPLETE'
4957 }
5058 return (
5159 < div css = { styles . container } >
@@ -57,6 +65,14 @@ const ReviewPage = (props: Props) => {
5765 { props . levels . map ( ( level : T . LevelUI , index : number ) =>
5866 show ( level . status ) ? (
5967 < div key = { level . id } >
68+ { adminMode && (
69+ < div css = { styles . adminNav } >
70+ < Button type = "normal" warning >
71+ { level . id }
72+ < Icon type = "refresh" />
73+ </ Button >
74+ </ div >
75+ ) }
6076 < Content title = { level . title } content = { level . content } />
6177
6278 < div css = { styles . steps } >
@@ -66,6 +82,14 @@ const ReviewPage = (props: Props) => {
6682 }
6783 return show ( step . status ) ? (
6884 < div key = { step . id } >
85+ { adminMode && (
86+ < div css = { styles . adminNav } >
87+ < Button type = "normal" warning >
88+ { step . id }
89+ < Icon type = "refresh" />
90+ </ Button >
91+ </ div >
92+ ) }
6993 < Step
7094 key = { step . id }
7195 status = { step . status }
0 commit comments