Skip to content

Commit

Permalink
refactor: 💄 fix linter problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-cura committed Feb 21, 2023
1 parent 4e746bf commit 1c1aca1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
14 changes: 1 addition & 13 deletions src/components/chart-js-facade/chart-js-facade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
</template>
<script setup lang="ts">
import { Bar } from 'vue-chartjs'
import { Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale, CoreChartOptions, ElementChartOptions, PluginChartOptions, DatasetChartOptions, ScaleChartOptions } from 'chart.js'
import { _DeepPartialObject } from 'chart.js/dist/types/utils';
import { Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale } from 'chart.js'
import { Stat } from '@/models/pokemon.model';
import { chartGrowFactor, options } from '@/constants/chart-js.config';
import { statsToChart } from '@/utils/transformers';
Expand All @@ -17,15 +16,4 @@ const props = defineProps<{stats: Stat[]}>()
const wrapperHeight = props.stats.length * chartGrowFactor;
const chartData = statsToChart(props.stats)
/**<bar :data="chartData" :options="options"></bar>
const chartData = {
barThickness: 16,
labels: props.pokemon.stats.map(stat => capitalize(stat.stat.name)),
datasets: [{ data: props.pokemon.stats.map(stat => stat.base_stat) }]
}
}*/
</script>
2 changes: 1 addition & 1 deletion src/stores/pokemon-list.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const usePokemonListStore = defineStore("pokemon-list", {
async fetchAndUpdatePokemons(paginatorInfo: PaginatorDataSource) {
const { limit, offset } = paginatorInfo;
this.loading = true;
const pokemonsResponse = await this.$pokemonService.getAll(limit!, offset!)
const pokemonsResponse = await this.$pokemonService.getAll(limit ?? 0, offset ?? 0)
if (pokemonsResponse.succeeded) {
handleSuccessfullyPokemonListRequest(pokemonsResponse.result, paginatorInfo)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/views/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>

<script setup lang="ts">
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, useIonRouter } from '@ionic/vue';
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';
import ItemPaginator from '@/components/item-paginator.vue';
import { usePokemonListStore } from '@/stores/pokemon-list.store';
import { onMounted } from 'vue';
Expand Down

0 comments on commit 1c1aca1

Please sign in to comment.