()
| 1 | import { useRouter } from 'next/router' |
| 2 | |
| 3 | export function useActiveSection(): 'learn' | 'apis' | 'home' { |
| 4 | const { asPath } = useRouter() |
| 5 | if (asPath.startsWith('/learn')) { |
| 6 | return 'learn' |
| 7 | } else if (asPath.startsWith('/apis')) { |
| 8 | return 'apis' |
| 9 | } else { |
| 10 | return 'home' |
| 11 | } |
| 12 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…