mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
15 lines
360 B
TypeScript
15 lines
360 B
TypeScript
import { useApi } from '../useApi';
|
|
|
|
export function useWebsiteSession(websiteId: string, sessionId: string) {
|
|
const { get, useQuery } = useApi();
|
|
|
|
return useQuery({
|
|
queryKey: ['session', { websiteId, sessionId }],
|
|
queryFn: () => {
|
|
return get(`/websites/${websiteId}/sessions/${sessionId}`);
|
|
},
|
|
});
|
|
}
|
|
|
|
export default useWebsiteSession;
|