Skip to content

Commit

Permalink
fix: type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Aug 20, 2024
1 parent 8acb342 commit 32183cc
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 48 deletions.
3 changes: 3 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

// @ts-ignore
const lightCodeTheme = require("prism-react-renderer").themes.vsLight;
// @ts-ignore
const darkCodeTheme = require("prism-react-renderer").themes.vsDark;

const DefaultLocale = 'en';
Expand All @@ -25,6 +27,7 @@ const config = {
"classic",
{
docs: {
// @ts-ignore
editUrl: ({locale, versionDocsDirPath, docPath}) => {
// Link to Crowdin for French docs
if (locale !== DefaultLocale) {
Expand Down
2 changes: 1 addition & 1 deletion i18n/de/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/es/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/fr/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/hi/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/it/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/ja/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/ko/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/pt/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/ru/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
2 changes: 1 addition & 1 deletion i18n/zh/docusaurus-plugin-content-pagesindex.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@easyops-cn/docusaurus-search-local": "^0.36.0",
"@matteusan/sentro": "1.1.0",
"@mdx-js/react": "1.6.22",
"@types/react": "17.0.0",
"babel-plugin-module-resolver": "5.0.2",
"clsx": "2.1.1",
"discord-message-components": "https://gitpkg.now.sh/Pycord-Development/discord-message-components?aa468ada9b2b52986ae0aee4051660713c1e9095&scripts.postinstall=yarn%20install%20--ignore-scripts%20%26%26%20node%20node_modules%2Fesbuild%2Finstall.js%20%26%26yarn%20build%3Amarkdown%20%26%26%20yarn%20build%3Acore%20%26%26%20yarn%20build%3Areact%20%26%26",
Expand All @@ -63,6 +62,8 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.4.3",
"@tsconfig/docusaurus": "2.0.3",
"@types/react": "17.0.0",
"@types/react-twemoji": "0.4.3",
"micromark-extension-mdx-md": "^2.0.0",
"remark-cli": "^12.0.1",
"remark-comment": "^1.0.0",
Expand Down
74 changes: 37 additions & 37 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import React from "react";
import DefaultLayout from "../layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

export default function Home(): JSX.Element {
return (
<DefaultLayout
title="Pycord Guide"
description="The Official Guide for Pycord"
>
<PYCHero
title="Pycord Guide"
subtitle="Learn how to create Discord bots with Pycord"
hasLogo={true}
/>
<main className="content-wrap--home-page">
Imagine a place where you can learn how to create an awesome Discord
bot, equip it with Pycord, and have it running in less than a minute.
Imagine a place where you can learn everything about Pycord. Imagine a
guide. A Pycord Guide!
<br /> <br />
Whether you are a newbie or an experienced developer, you will find
everything you need to know about Pycord here. This guide will teach
you:
<ul>
<li>How to get a brand new bot running from scratch;</li>
<li>How to create Interactions, Context Menus and Commands;</li>
<li>In-depth concepts such as Embeds, Reactions, Help Commands, Paginators, etc;</li>
<li>Popular Topics such as working with Databases, Sharding, etc;</li>
<li>Ways to handle and manage common errors and best practices for bots;</li>
<li>And Much More!</li>
</ul>
</main>
</DefaultLayout>
);
}
import React from "react";
import DefaultLayout from "@site/src/layouts/DefaultLayout";
import PYCHero from "@site/src/components/PYCHero";
import PYCButton from "@site/src/components/PYCButton";

export default function Home(): JSX.Element {
return (
<DefaultLayout
title="Pycord Guide"
description="The Official Guide for Pycord"
>
<PYCHero
title="Pycord Guide"
subtitle="Learn how to create Discord bots with Pycord"
hasLogo={true}
/>
<main className="content-wrap--home-page">
Imagine a place where you can learn how to create an awesome Discord
bot, equip it with Pycord, and have it running in less than a minute.
Imagine a place where you can learn everything about Pycord. Imagine a
guide. A Pycord Guide!
<br /> <br />
Whether you are a newbie or an experienced developer, you will find
everything you need to know about Pycord here. This guide will teach
you:
<ul>
<li>How to get a brand new bot running from scratch;</li>
<li>How to create Interactions, Context Menus and Commands;</li>
<li>In-depth concepts such as Embeds, Reactions, Help Commands, Paginators, etc;</li>
<li>Popular Topics such as working with Databases, Sharding, etc;</li>
<li>Ways to handle and manage common errors and best practices for bots;</li>
<li>And Much More!</li>
</ul>
</main>
</DefaultLayout>
);
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"resolveJsonModule": true,
"baseUrl": ".",
"forceConsistentCasingInFileNames": true,
"noImplicitAny": false,
"paths": {
"@site/*": ["./*"],
"react": ["./node_modules/@types/react"]
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2678,6 +2678,13 @@
"@types/history" "^4.7.11"
"@types/react" "*"

"@types/[email protected]":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@types/react-twemoji/-/react-twemoji-0.4.3.tgz#83542b47ffcee8c872b669a05e74a5ef7876e497"
integrity sha512-VzWkjmO8yJ31JSWgQhe0LCLU3FxcurTOklECm9p8v1xI/WfUBOGbSrqPjQPL46LE4oOqfrYIQ+0LM/8I6A8EDQ==
dependencies:
"@types/react" "*"

"@types/react@*", "@types/[email protected]":
version "17.0.2"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.2.tgz#3de24c4efef902dd9795a49c75f760cbe4f7a5a8"
Expand Down

0 comments on commit 32183cc

Please sign in to comment.