(pathname: string, selectedScope: string)
| 14 | const atHomepage = (pathname: string) => pathname === '/' |
| 15 | |
| 16 | const pathnameFor = (pathname: string, selectedScope: string) => { |
| 17 | if (atHomepage(pathname)) return topicPath(everythingTopicId) |
| 18 | return selectedScope === 'Everything' ? topicPath(everythingTopicId) : pathname |
| 19 | } |
| 20 | |
| 21 | const onFormSubmit = (event: FormEvent<HTMLFormElement>) => { |
| 22 | event.preventDefault() |
no test coverage detected