File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed
Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1919 'home' : 'Cryptography Learning Platform' ,
2020 'tutorial' : 'Tutorial' ,
2121 'practice' : 'Practice' ,
22- 'learning' : 'Learning'
22+ 'learning' : 'Learning' ,
23+ 'feedback' : 'Feedback' ,
2324 } ,
2425 'homepage' : {
2526 'intro' : {
6768 'tutorial' : '教程' ,
6869 'practice' : '实践' ,
6970 'learning' : '学习' ,
71+ 'feedback' : '反馈' ,
7072 } ,
7173 'homepage' : {
7274 'intro' : {
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import styled from '@emotion/styled/macro'
3+ import { Div } from 'components/Div'
4+ import { navbarHeight } from 'components/common'
5+ import { WIP } from 'components/404'
6+
7+ const Wrapper = styled ( Div ) `
8+ min-height: calc(100vh - ${ navbarHeight } px);
9+ text-align: center;
10+ display: flex;
11+ justify-content: center;
12+ align-items: center;
13+ `
14+
15+ export const Page : React . FC = ( ) => {
16+
17+ return < Wrapper >
18+ < WIP />
19+ </ Wrapper >
20+ }
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ export const Page: React.FC = ({ children }) => {
6161 // const items = Object.keys(i18n.services.resourceStore.data)
6262 const [ dark , setDark ] = useState ( false )
6363 const history = useHistory ( )
64+ const feedbackURL = process . env . REACT_APP_FEEDBACK_URL
65+ const handleOpenFeedback = feedbackURL ? ( ) => window . open ( feedbackURL ) : ( ) => history . push ( '/feedback' )
6466
6567 return < Layout className = { dark ? 'bp3-dark' : '' } >
6668 < Header >
@@ -74,6 +76,7 @@ export const Page: React.FC = ({ children }) => {
7476 { /* <Button minimal large icon={IconNames.HELP} text={t('nav.tutorial')} onClick={() => history.push('/tutorial')} /> */ }
7577 { /* <Button minimal large icon={IconNames.SEARCH} text={t('nav.learning')} onClick={() => history.push('/learning')} /> */ }
7678 < Button minimal large icon = { IconNames . FLAG } text = { t ( 'nav.practice' ) } onClick = { ( ) => history . push ( '/practice' ) } />
79+ < Button minimal large icon = { IconNames . ENVELOPE } text = { t ( 'nav.feedback' ) } onClick = { handleOpenFeedback } />
7780 </ Unselectable >
7881 </ NavbarGroup >
7982 < NavbarGroup align = { Alignment . RIGHT } >
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export const Routes: React.FC = () => {
3333 < RoutePage exact path = { Pattern . Lab } page = { import ( 'pages/practice' ) } />
3434 < RoutePage path = '/practice' page = { import ( 'pages/practice' ) } />
3535 < RoutePage path = '/learning' page = { import ( 'pages/learning' ) } />
36+ < RoutePage path = '/feedback' page = { import ( 'pages/feedback' ) } />
3637 < RoutePage exact path = '/' page = { import ( 'pages/home' ) } />
3738 < Redirect to = '/' />
3839 </ Switch >
You can’t perform that action at this time.
0 commit comments