The data returned from the useKosRegions hook.

Type Param: RegionData

the region data returned from the backend service. The type must extend BaseRegionResponse from the kos-core-model.

interface KosTimeFormatHookData<T> {
    raw: string[];
    selectedTimeFormat: string;
    updateTimeFormat: ((e) => void);
    props: {
        onChange: ((e) => void);
        value: string;
        options: T[];
    };
    regionModel?: RegionInfoModel<BaseRegionResponse>;
}

Type Parameters

  • T extends {} = any

    the type of the options returned from the regionMap function.

Properties

raw: string[]

the raw region data returned from the backend service.

selectedTimeFormat: string

the currently selected region.

updateTimeFormat: ((e) => void)

a function that can be used to update the region.

Type declaration

    • (e): void
    • Parameters

      • e: SelectCallback

      Returns void

props: {
    onChange: ((e) => void);
    value: string;
    options: T[];
}

the props that can be spread into a select box component.

Type declaration

  • onChange: ((e) => void)
      • (e): void
      • Parameters

        • e: SelectCallback

        Returns void

  • value: string
  • options: T[]
regionModel?: RegionInfoModel<BaseRegionResponse>

the region model returned from the backend service.