Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
João Antônio Hamerski Copetti committed Jan 8, 2024
1 parent f8c8119 commit cf7ddd7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/types/utils/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
export type RequestParams = {
[any: string]: string | number
}
export type RequestParams = Record<string, string>

export type RequestOptions = RequestInit & {
params?: RequestParams
}

export type UrlParams = {
[prop: string]: string | null
}
export type UrlParams = Record<string, string | null>
5 changes: 1 addition & 4 deletions src/utils/fetch-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type {
RequestParams,
RequestOptions,
} from '@/types/utils/fetch-api-types'
import type { RequestParams, RequestOptions } from '@/types/utils'

const API_URL = 'https://api.github.com'

Expand Down
2 changes: 1 addition & 1 deletion src/views/profile/TheProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const onOptionsUpdate = async ({ option, value }: ReposOption) => {
const fetchData = async (params: RepoParams = {}) => {
const DEFAULT_PARAMS: RepoParams = {
sort: 'full_name',
per_page: 100,
per_page: '100',
}
isLoading.value = true
Expand Down

0 comments on commit cf7ddd7

Please sign in to comment.