@@ -23,7 +23,7 @@ import {
2323 Theme ,
2424 withStyles
2525} from '@material-ui/core/styles'
26- import { RouteComponentProps , withRouter } from 'react-router-dom'
26+ import { useLocation } from 'react-router-dom'
2727
2828const useStyles = ( theme : Theme ) : StyleRules => createStyles (
2929 {
@@ -43,14 +43,100 @@ const useStyles = (theme: Theme): StyleRules => createStyles(
4343 }
4444 } )
4545
46- interface HelpProps extends RouteComponentProps {
46+ function HelpContainer ( ) : JSX . Element {
47+ const location = useLocation ( )
48+ return (
49+ < Container maxWidth = "md" >
50+ { location . pathname !== '/help' && (
51+ < Box mt = { 2 } >
52+ < Typography
53+ align = "center"
54+ color = "textPrimary"
55+ variant = "h2"
56+ >
57+ Whoops! The URL specified routes to this help page.
58+ </ Typography >
59+ </ Box >
60+ ) }
61+ < Box mt = { 6 } >
62+ < Typography
63+ align = "center"
64+ color = "textPrimary"
65+ variant = "h3"
66+ >
67+ More information about Selenium Grid can be found at the{ ' ' }
68+ < Link
69+ href = "https://www.selenium.dev/documentation/grid/"
70+ target = "_blank" rel = "noreferrer"
71+ >
72+ documentation
73+ </ Link > .
74+ </ Typography >
75+ </ Box >
76+ < Box mt = { 6 } >
77+ < Typography
78+ align = "center"
79+ color = "textPrimary"
80+ variant = "h3"
81+ >
82+ Please report bugs and issues to the Selenium{ ' ' }
83+ < Link
84+ href = "https://github.com/SeleniumHQ/selenium/issues/new/choose"
85+ target = "_blank" rel = "noreferrer"
86+ >
87+ issue tracker
88+ </ Link > .
89+ </ Typography >
90+ </ Box >
91+ < Box mt = { 6 } >
92+ < Typography
93+ align = "center"
94+ color = "textPrimary"
95+ variant = "h3"
96+ >
97+ For questions and help, check the different support channels on
98+ our{ ' ' }
99+ < Link
100+ href = "https://www.selenium.dev/support/"
101+ target = "_blank" rel = "noreferrer"
102+ >
103+ website
104+ </ Link > .
105+ </ Typography >
106+ </ Box >
107+ < Box m = { 10 } >
108+ < Typography
109+ align = "center"
110+ color = "textPrimary"
111+ variant = "h4"
112+ >
113+ Selenium is made possible through the efforts of our open source
114+ community, contributions from these{ ' ' }
115+ < Link
116+ href = "https://www.selenium.dev/documentation/about/copyright_and_attributions/"
117+ target = "_blank" rel = "noreferrer"
118+ >
119+ people
120+ </ Link >
121+ , and our{ ' ' }
122+ < Link href = "https://www.selenium.dev/sponsors/" target = "_blank"
123+ rel = "noreferrer" >
124+ sponsors
125+ </ Link > .
126+ </ Typography >
127+ </ Box >
128+ </ Container >
129+ )
130+ }
131+
132+ interface HelpProps {
47133 classes : any
48134}
49135
50136class Help extends React . Component < HelpProps , { } > {
51137 // noinspection HtmlUnknownAnchorTarget
52138 render ( ) : ReactNode {
53- const { classes, location } = this . props
139+ const { classes } = this . props
54140
55141 return (
56142 < div className = { classes . root } >
@@ -60,89 +146,11 @@ class Help extends React.Component<HelpProps, {}> {
60146 height = '100%'
61147 justifyContent = 'center'
62148 >
63- < Container maxWidth = 'md' >
64- { location . pathname !== '/help' && (
65- < Box mt = { 2 } >
66- < Typography
67- align = 'center'
68- color = 'textPrimary'
69- variant = 'h2'
70- >
71- Whoops! The URL specified routes to this help page.
72- </ Typography >
73- </ Box >
74- ) }
75- < Box mt = { 6 } >
76- < Typography
77- align = 'center'
78- color = 'textPrimary'
79- variant = 'h3'
80- >
81- More information about Selenium Grid can be found at the{ ' ' }
82- < Link
83- href = "https://www.selenium.dev/documentation/grid/"
84- target = "_blank" rel = "noreferrer"
85- >
86- documentation
87- </ Link > .
88- </ Typography >
89- </ Box >
90- < Box mt = { 6 } >
91- < Typography
92- align = 'center'
93- color = 'textPrimary'
94- variant = 'h3'
95- >
96- Please report bugs and issues to the Selenium{ ' ' }
97- < Link
98- href = 'https://github.com/SeleniumHQ/selenium/issues/new/choose'
99- target = '_blank' rel = 'noreferrer'
100- >
101- issue tracker
102- </ Link > .
103- </ Typography >
104- </ Box >
105- < Box mt = { 6 } >
106- < Typography
107- align = 'center'
108- color = 'textPrimary'
109- variant = 'h3'
110- >
111- For questions and help, check the different support channels on
112- our{ ' ' }
113- < Link
114- href = 'https://www.selenium.dev/support/'
115- target = '_blank' rel = 'noreferrer'
116- >
117- website
118- </ Link > .
119- </ Typography >
120- </ Box >
121- < Box m = { 10 } >
122- < Typography
123- align = 'center'
124- color = 'textPrimary'
125- variant = 'h4'
126- >
127- Selenium is made possible through the efforts of our open source
128- community, contributions from these{ ' ' }
129- < Link
130- href = "https://www.selenium.dev/documentation/about/copyright_and_attributions/"
131- target = "_blank" rel = 'noreferrer'
132- >
133- people
134- </ Link >
135- , and our{ ' ' }
136- < Link href = 'https://www.selenium.dev/sponsors/' target = '_blank' rel = 'noreferrer' >
137- sponsors
138- </ Link > .
139- </ Typography >
140- </ Box >
141- </ Container >
149+ < HelpContainer />
142150 </ Box >
143151 </ div >
144152 )
145153 }
146154}
147155
148- export default withStyles ( useStyles ) ( withRouter ( Help ) )
156+ export default withStyles ( useStyles ) ( Help )
0 commit comments