diff --git a/src/components/BaseComponents/Markdown/index.tsx b/src/components/BaseComponents/Markdown/index.tsx index d13565f432..e30b6e34c6 100644 --- a/src/components/BaseComponents/Markdown/index.tsx +++ b/src/components/BaseComponents/Markdown/index.tsx @@ -8,7 +8,7 @@ import { okaidia } from "react-syntax-highlighter/dist/esm/styles/prism"; import remarkGfm from "remark-gfm"; import styles from "./styles.module.scss"; import React from "react"; -import RightSvg from "../@site/static/icons/arrowright.svg"; +import { FaArrowRight } from "react-icons/fa"; interface IProps { textContent: string; @@ -45,7 +45,7 @@ const AskDatabendMarkdown: FC = ({ textContent }): ReactElement => { setIsCopy(true); }} > - {isCopy ? : <>Copy} + {isCopy ? : <>Copy} ) : ( diff --git a/src/components/CookiesConsent/index.js b/src/components/CookiesConsent/index.js deleted file mode 100644 index 2e34afc116..0000000000 --- a/src/components/CookiesConsent/index.js +++ /dev/null @@ -1,54 +0,0 @@ -import React, { useEffect } from "react"; -import clsx from "clsx"; -import Link from "@docusaurus/Link"; -import styles from "./styles.module.scss"; -import { useState } from "react"; -const COOKIE_KEY = "COOKIE_KEY"; -import Close from "@site/static/icons/close.svg"; - -function CookiesConsent() { - const [isHidden, setIsHidden] = useState(true); - const closePopup = () => { - window["ga-disable-G-WBQPTTG4ZG"] = true; - setCookiesKey(); - }; - const acceptAll = () => { - window["ga-disable-G-WBQPTTG4ZG"] = false; - setCookiesKey(); - }; - useEffect(() => { - const isAccept = window.localStorage.getItem(COOKIE_KEY); - if (!isAccept) { - setIsHidden(false); - } - }); - function setCookiesKey() { - window.localStorage.setItem(COOKIE_KEY, 1); - setIsHidden(true); - } - return ( - <> - {!isHidden && ( -
-

- - We use cookies on our site to provide you with better user - experience. You can view our Cookies Policy in{" "} - - Privacy Policy . -

-
- -
- -
-
-
- )} - - ); -} - -export default React.memo(CookiesConsent); diff --git a/src/components/CookiesConsent/styles.module.scss b/src/components/CookiesConsent/styles.module.scss deleted file mode 100644 index a07fbe5280..0000000000 --- a/src/components/CookiesConsent/styles.module.scss +++ /dev/null @@ -1,78 +0,0 @@ -.consentWrap{ - position: fixed; - bottom: 32px; - left: calc(50% - 360px); - width: 100%; - background-color: var(--color-bg-5); - box-shadow: 0px 0px 24px -5px #000; - padding: 16px; - display: flex; - justify-content: space-between; - align-items: center; - z-index: 99999; - animation-name: slideBottom; - animation-duration: .8s; - animation-timing-function: ease-in-out; - animation-delay: normal; - animation-iteration-count: 1; - color: white; - max-width: 720px; - margin: 0 auto; - border-radius: 12px; - p{ - margin-bottom: 0; - font-size: 14px; - width: fit-content; - min-width: none!important; - } - .right{ - display: flex; - align-items: center; - } - .button{ - cursor: pointer; - background: #1890ff; - color: #fff; - border: none !important; - margin: 0 8px; - padding: 8PX 24PX; - border-radius: 5px; - font-size: 13px; - line-height: 18PX; - &:hover{ - background-color: #2976d4; - } - } - .close{ - display: flex; - color: #fff; - cursor: pointer; - margin-left: 10px; - padding: 2px; - width: 32px; - } - @include media{ - bottom: 20px; - width: calc( 100% - 40px); - left: 20px; - flex-wrap: wrap; - gap: 12px; - padding: 20px; - justify-content: center; - text-align: center; - p{ - max-width: inherit; - min-width: inherit!important; - width: inherit; - } - } -} - -@keyframes slideBottom { - 0% { - transform: translateY(100%); - } - 100% { - transform: translateY(0%); - } -} \ No newline at end of file diff --git a/src/components/CopyPageButton/index.tsx b/src/components/CopyPageButton/index.tsx index b405b31a2b..85717e5273 100644 --- a/src/components/CopyPageButton/index.tsx +++ b/src/components/CopyPageButton/index.tsx @@ -1,7 +1,8 @@ import React, { useState, useMemo, useCallback } from "react"; import { Button, Dropdown, Flex, Spin } from "antd"; import styles from "./styles.module.scss"; -import DownArrow from "@site/static/icons/down.svg"; +import { FaAngleDown } from "react-icons/fa6"; + import { useDoc } from "@docusaurus/plugin-content-docs/client"; import axios from "axios"; import $t from "@site/src/utils/tools"; @@ -170,7 +171,7 @@ const CopyDropdownButton: React.FC = () => { onClick={() => handleCopy(sourceUrl)} menu={menu} placement="bottomRight" - icon={} + icon={} className={styles.buttonCainter} trigger={["click"]} > diff --git a/src/components/CopyPageButton/styles.module.scss b/src/components/CopyPageButton/styles.module.scss index f7e2e59635..7065a3a95e 100644 --- a/src/components/CopyPageButton/styles.module.scss +++ b/src/components/CopyPageButton/styles.module.scss @@ -27,6 +27,8 @@ } } .svg { + position: relative; + top: 1px !important; path { fill: var(--color-text-0) !important; } diff --git a/src/theme/DocCard/index.tsx b/src/theme/DocCard/index.tsx index 8220bde589..72cd7f523b 100644 --- a/src/theme/DocCard/index.tsx +++ b/src/theme/DocCard/index.tsx @@ -11,7 +11,6 @@ import { translate } from "@docusaurus/Translate"; import DocsSvg from "@site/static/icons/docs.svg"; import FolderSvg from "@site/static/icons/folder.svg"; -import type { Props } from "@theme/DocCard"; // import Heading from "@theme/Heading"; import type { PropSidebarItemCategory, @@ -115,7 +114,7 @@ function CardLink({ item }: { item: PropSidebarItemLink }): ReactNode { ); } -export default function DocCard({ item }: Props): ReactNode { +export default function DocCard({ item }: any): ReactNode { switch (item.type) { case "link": return ; diff --git a/src/theme/DocItem/Content/index.tsx b/src/theme/DocItem/Content/index.tsx index c076ecd35c..ebe1f3c81a 100644 --- a/src/theme/DocItem/Content/index.tsx +++ b/src/theme/DocItem/Content/index.tsx @@ -2,9 +2,10 @@ import React, { type ReactNode } from "react"; import clsx from "clsx"; import { ThemeClassNames } from "@docusaurus/theme-common"; import { useDoc } from "@docusaurus/plugin-content-docs/client"; +// @ts-ignore import Heading from "@theme/Heading"; +// @ts-ignore import MDXContent from "@theme/MDXContent"; -import type { Props } from "@theme/DocItem/Content"; import styles from "./styles.module.css"; import CopyPageButton from "@site/src/components/CopyPageButton"; @@ -28,7 +29,7 @@ function useSyntheticTitle(): string | null { return metadata.title; } -export default function DocItemContent({ children }: Props): ReactNode { +export default function DocItemContent({ children }: any): ReactNode { const syntheticTitle = useSyntheticTitle(); return (