Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
14 lines
512 B
TypeScript
14 lines
512 B
TypeScript
import axiosInstance from '@/config/axios'
|
|
import { unwrapApiPayload } from '@/helpers/listResponse'
|
|
|
|
export interface OrganizerViewerState {
|
|
isFollowing: boolean
|
|
attendeeContactLinks: { channel: string; label: string; url: string; value: string }[]
|
|
}
|
|
|
|
export async function fetchOrganizerViewerState(organizerId: string): Promise<OrganizerViewerState> {
|
|
const response = await axiosInstance.get(`users/public/${organizerId}/viewer-state`)
|
|
|
|
return unwrapApiPayload<OrganizerViewerState>(response.data)
|
|
}
|