@dhiraj0720/report1chart 2.2.5 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhiraj0720/report1chart",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "main": "src/index.jsx",
5
5
  "scripts": {
6
6
  "test": "echo 'No tests'"
@@ -1,27 +1,27 @@
1
1
  import axios from 'axios';
2
2
 
3
- export const fetchDivisions = async (endpoint, token) => {
3
+ export const getDivisions = async (endpoint, token) => {
4
4
  const res = await axios.get(endpoint, {
5
5
  headers: { Authorization: token },
6
6
  });
7
7
  return res.data.data || [];
8
8
  };
9
9
 
10
- export const fetchTable = async (endpoint, division, token) => {
10
+ export const getTable = async (endpoint, division, token) => {
11
11
  const res = await axios.get(`${endpoint}?division=${division}`, {
12
12
  headers: { Authorization: token },
13
13
  });
14
14
  return res.data;
15
15
  };
16
16
 
17
- export const fetchLineChart = async (endpoint, division, token) => {
17
+ export const getLine = async (endpoint, division, token) => {
18
18
  const res = await axios.get(`${endpoint}?division=${division}`, {
19
19
  headers: { Authorization: token },
20
20
  });
21
21
  return res.data;
22
22
  };
23
23
 
24
- export const fetchBarChart = async (endpoint, division, token) => {
24
+ export const getBar = async (endpoint, division, token) => {
25
25
  const res = await axios.get(`${endpoint}?division=${division}`, {
26
26
  headers: { Authorization: token },
27
27
  });
@@ -1,6 +1,11 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { ScrollView, Text, ActivityIndicator } from 'react-native';
3
- import { getDivisions, getTable, getLine, getBar } from '../api/report2Fetcher';
3
+ import {
4
+ getDivisions,
5
+ getTable,
6
+ getLine,
7
+ getBar,
8
+ } from '../api/report2Fetcher';
4
9
  import MonthSelector from '../components/MonthSelector';
5
10
  import DivisionSelector from '../components/DivisionSelector';
6
11
  import FrozenTable from '../components/FrozenTable';