()
| 7 | |
| 8 | /** Renders either the Welcome page, an Individual resource, or search results. */ |
| 9 | const Show: React.FunctionComponent = () => { |
| 10 | // Value shown in navbar, after Submitting |
| 11 | const [subject] = useCurrentSubject(); |
| 12 | |
| 13 | if (subject == undefined || subject == '') { |
| 14 | return <About />; |
| 15 | } |
| 16 | if (isValidURL(subject)) { |
| 17 | return <ResourcePage key={subject} subject={subject} />; |
| 18 | } else { |
| 19 | return <Search />; |
| 20 | } |
| 21 | }; |
| 22 | |
| 23 | export default Show; |
nothing calls this directly
no test coverage detected