Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
hdJerry committed Aug 28, 2023
1 parent d1052f7 commit ee0da1c
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion qwik-graphql-tailwind/src/components/file-viewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function updateFile(store: FileStore, response: any) {
store.isLoading = false;
}

export async function fetchFile(payload: FileQueryParams, abortController?: AbortController): Promise<any> {
export async function fetchFile(payload: FileQueryParams, abortController?: AbortController) {
const { executeQuery$ } = useQuery(REPO_FILE_QUERY);

const resp = await executeQuery$({
Expand Down
2 changes: 1 addition & 1 deletion qwik-graphql-tailwind/src/components/gists/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function updateGists(store: GistStore, response: any) {
store.isLoading = false;
}

export async function fetchGIst(abortController?: AbortController): Promise<any> {
export async function fetchGIst(abortController?: AbortController) {
const { executeQuery$ } = useQuery(USER_GISTS_QUERY);

const resp = await executeQuery$({
Expand Down
2 changes: 1 addition & 1 deletion qwik-graphql-tailwind/src/components/top-repos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function updateTopRepos(store: RepoStore, response: any) {
store.isLoading = false;
}

export async function fetchTopRepos(abortController?: AbortController): Promise<any> {
export async function fetchTopRepos(abortController?: AbortController) {
const { executeQuery$ } = useQuery(TOP_REPOS_QUERY);

const resp = await executeQuery$({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function updateRepos(store: RepoStore, response: any) {
export async function fetchRepos(
{ username, afterCursor, beforeCursor }: RepoQueryParams,
abortController?: AbortController
): Promise<any> {
) {
const { executeQuery$ } = useQuery(REPOS_QUERY);

const resp = await executeQuery$({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function fetchRepoTree(
expression: string;
},
abortController?: AbortController
): Promise<any> {
) {
const { executeQuery$ } = useQuery(REPO_TREE_QUERY);

const resp = await executeQuery$({
Expand Down Expand Up @@ -124,7 +124,7 @@ export async function fetchRepoReadMe(
expression: string;
},
abortController?: AbortController
): Promise<any> {
) {
const { executeQuery$ } = useQuery(REPO_README_QUERY);

const resp = await executeQuery$({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export async function fetchRepoInfo(
name: string;
},
abortController?: AbortController
): Promise<any> {
) {
const { executeQuery$ } = useQuery(REPO_INFO_QUERY);

const resp = await executeQuery$({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function fetchRepoTree(
expression: string;
},
abortController?: AbortController
): Promise<any> {
) {
const { executeQuery$ } = useQuery(REPO_TREE_QUERY);

const resp = await executeQuery$({
Expand Down
5 changes: 1 addition & 4 deletions qwik-graphql-tailwind/src/routes/[user]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ export function updateUserProfile(store: UserStore, response: any) {
store.user = response.data.user;
}

export async function fetchUserProfile(
{ username }: ProfileQueryParams,
abortController?: AbortController
): Promise<any> {
export async function fetchUserProfile({ username }: ProfileQueryParams, abortController?: AbortController) {
const { executeQuery$ } = useQuery(USER_PROFILE_QUERY);

const resp = await executeQuery$({
Expand Down
2 changes: 1 addition & 1 deletion qwik-graphql-tailwind/src/routes/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function updateUserProfile(store: UserStore, response: any) {
sessionStorage.setItem('user', JSON.stringify(response.data.viewer));
}

export async function fetchAuthenticatedUser(token: string | null, abortController?: AbortController): Promise<any> {
export async function fetchAuthenticatedUser(token: string | null, abortController?: AbortController) {
const { executeQuery$ } = useQuery(`
query ViewerQuery {
viewer {
Expand Down
5 changes: 1 addition & 4 deletions qwik-graphql-tailwind/src/routes/orgs/[name]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ export default component$(() => {
);
});

export async function fetchOrgRepos(
{ organization, first }: OrgRepoQueryParams,
abortController?: AbortController
): Promise<any> {
export async function fetchOrgRepos({ organization, first }: OrgRepoQueryParams, abortController?: AbortController) {
const { executeQuery$ } = useQuery(ORG_REPOS_QUERY);

const resp = await executeQuery$({
Expand Down

0 comments on commit ee0da1c

Please sign in to comment.