2022-06-24 10:38:00 -05:00
|
|
|
import { useRouter } from 'next/router'
|
2023-07-25 15:29:45 -05:00
|
|
|
import { Select } from './form'
|
2023-07-23 10:08:43 -05:00
|
|
|
import { WHENS } from '../lib/constants'
|
2022-06-24 10:38:00 -05:00
|
|
|
|
|
|
|
export function UsageHeader () {
|
|
|
|
const router = useRouter()
|
2022-12-01 15:31:04 -06:00
|
|
|
|
2022-06-24 10:38:00 -05:00
|
|
|
return (
|
2023-07-25 15:29:45 -05:00
|
|
|
<div className='text-muted fw-bold my-3 d-flex align-items-center'>
|
|
|
|
stacker analytics for
|
|
|
|
<Select
|
|
|
|
groupClassName='mb-0 ms-2'
|
|
|
|
className='w-auto'
|
|
|
|
name='when'
|
|
|
|
size='sm'
|
|
|
|
items={WHENS}
|
|
|
|
value={router.query.when || 'day'}
|
|
|
|
noForm
|
|
|
|
onChange={(formik, e) => router.push(`/stackers/${e.target.value}`)}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-06-24 10:38:00 -05:00
|
|
|
)
|
|
|
|
}
|