From edf45774ba8bc8eda679be1ba92b491813f9280d Mon Sep 17 00:00:00 2001 From: Leifer Mendez Date: Tue, 27 Dec 2022 21:53:12 +0100 Subject: [PATCH] docs: :zap: added contributors --- .../src/components/widgets/Collaborators.tsx | 25 +++++++++++-------- packages/docs/vite.config.ts | 5 ---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/docs/src/components/widgets/Collaborators.tsx b/packages/docs/src/components/widgets/Collaborators.tsx index 4218ad7..17c1360 100644 --- a/packages/docs/src/components/widgets/Collaborators.tsx +++ b/packages/docs/src/components/widgets/Collaborators.tsx @@ -1,20 +1,23 @@ import { component$, Resource, useResource$ } from '@builder.io/qwik' import Collaborator from './Collaborator' -import { Octokit } from '@octokit/core' -export const octokit = new Octokit({ - auth: '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', -}) - -export const apiGetCollaborators = () => - octokit.request( - 'GET /repos/codigoencasa/bot-whatsapp/contributors{?anon,per_page,page}', +export const apiGetCollaborators = async () => { + const data = fetch( + `https://api.github.com/repos/codigoencasa/bot-whatsapp/contributors`, { - owner: 'OWNER', - repo: 'REPO', + method: 'GET', + headers: { + Accept: 'application/vnd.github+json', + 'X-GitHub-Api-Version': '2022-11-28', + Authorization: + 'Bearer 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', + }, } ) + return (await data).json() +} + export const TaleUsers = component$((props: { users: any[] }) => { return ( <> @@ -30,7 +33,7 @@ export const TaleUsers = component$((props: { users: any[] }) => { export default component$(() => { const collaboratorsResource = useResource$( - async () => await (await apiGetCollaborators()).data + async () => await apiGetCollaborators() ) return ( diff --git a/packages/docs/vite.config.ts b/packages/docs/vite.config.ts index 4facbee..d59010d 100644 --- a/packages/docs/vite.config.ts +++ b/packages/docs/vite.config.ts @@ -13,11 +13,6 @@ export default defineConfig(() => { qwikCity({ basePathname: SITE.basePathname, trailingSlash: SITE.trailingSlash, - mdxPlugins: { - rehypeSyntaxHighlight: true, - rehypeAutolinkHeadings: false, - remarkGfm: true, - }, }), qwikVite(), tsconfigPaths(),