11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
|
|
import { atom } from 'nanostores'
|
||
|
|
import { createFetcherStore } from './fetcher'
|
||
|
|
import type { AnalyticsSummary } from '../types'
|
||
|
|
|
||
|
|
export const $days = atom(30)
|
||
|
|
|
||
|
|
export const $analytics = createFetcherStore<AnalyticsSummary>([
|
||
|
|
'/api/studio/analytics?days=',
|
||
|
|
$days,
|
||
|
|
])
|