diff --git a/src/components/CarbonAds.tsx b/src/components/CarbonAds.tsx
index bff566b4d..1355aa675 100644
--- a/src/components/CarbonAds.tsx
+++ b/src/components/CarbonAds.tsx
@@ -35,4 +35,4 @@ export function CarbonAds({ id }: { id: string }) {
}, [id])
return
-}
\ No newline at end of file
+}
diff --git a/src/components/CopyMarkdownButton.module.css b/src/components/CopyMarkdownButton.module.css
deleted file mode 100644
index 1cf7bfd87..000000000
--- a/src/components/CopyMarkdownButton.module.css
+++ /dev/null
@@ -1,36 +0,0 @@
-.wrapper {
- display: flex;
- justify-content: flex-end;
- margin-bottom: 10px;
-}
-
-.button {
- background: none;
- border: 1px solid var(--color-secondary);
- color: var(--color-secondary);
- border-radius: 4px;
- font-size: 13px;
- padding: 4px 12px;
- cursor: pointer;
- transition: background 0.2s, border-color 0.2s, color 0.2s;
-}
-
-.button:hover {
- background: var(--color-secondary);
- color: white;
-}
-
-.button:disabled {
- cursor: default;
- opacity: 0.6;
-}
-
-.copied {
- border-color: #10b981;
- color: #10b981;
-}
-
-.error {
- border-color: #ef4444;
- color: #ef4444;
-}
diff --git a/src/components/Menu/Menu.tsx b/src/components/Menu/Menu.tsx
index 42802dc36..1aea377c6 100644
--- a/src/components/Menu/Menu.tsx
+++ b/src/components/Menu/Menu.tsx
@@ -73,7 +73,7 @@ function Menu({ pages = [] }: { pages: Pages }) {
-
+
)
diff --git a/src/components/Menu/SideMenu.module.css b/src/components/Menu/SideMenu.module.css
index 2921db263..da2f6e96e 100644
--- a/src/components/Menu/SideMenu.module.css
+++ b/src/components/Menu/SideMenu.module.css
@@ -38,7 +38,8 @@
max-width: 230px;
padding: 0;
overflow-y: auto;
- height: calc(100vh - 190px);
+ height: calc(100vh - 600px);
+ overflow-y: auto;
}
.menu > div > ul > li {
@@ -48,6 +49,10 @@
display: flex;
}
+ .menu > div > ul > li:last-child {
+ padding-bottom: 0;
+ }
+
.menu > div > ul > li > a {
text-decoration: none;
padding-left: 6px;
@@ -117,6 +122,7 @@
.menu > div > ul {
margin-top: 0;
max-width: 260px;
+ height: calc(100vh - 450px);
}
.menu > ul {
@@ -203,3 +209,8 @@
.menu ul li a.isActive {
border-bottom: 1px solid var(--color-secondary);
}
+
+.ads {
+ position: absolute;
+ height: 500px;
+}
diff --git a/src/components/Search.tsx b/src/components/Search.tsx
index 68b818635..753c9409a 100644
--- a/src/components/Search.tsx
+++ b/src/components/Search.tsx
@@ -1,13 +1,9 @@
import { useRef, useEffect } from "react"
-import { useRouter } from "next/router"
import clsx from "clsx"
import searchStyles from "./Search.module.css"
import useWindowSize from "./utils/useWindowSize"
import { LARGE_SCREEN } from "../styles/breakpoints"
-const ORIGINAL_SITE_URL = "https://react-hook-form.com"
-const KO_SITE_URL = "https://react-ko-form.netlify.app"
-
const Search = ({
focus,
setFocus,
@@ -15,7 +11,6 @@ const Search = ({
focus: boolean
setFocus: (value: boolean) => void
}) => {
- const router = useRouter()
const { width } = useWindowSize()
const searchRef = useRef(null)
@@ -25,27 +20,12 @@ const Search = ({
apiKey: "c56a3f265ffbf85c2c654f865cb09164",
indexName: "react-hook-form",
inputSelector: "#algolia-doc-search",
- transformData(suggestions) {
- return suggestions.map((suggestion) => ({
- ...suggestion,
- url: suggestion.url.replace(ORIGINAL_SITE_URL, KO_SITE_URL),
- }))
- },
- handleSelected(_input, event, suggestion) {
- event.preventDefault()
- try {
- const url = new URL(suggestion.url)
- router.push(url.pathname + url.hash)
- } catch {
- router.push(suggestion.url)
- }
- },
})
return () => {
setFocus(false)
}
- }, [setFocus, router])
+ }, [setFocus])
useEffect(() => {
if (LARGE_SCREEN <= width) {
diff --git a/src/components/layout.css b/src/components/layout.css
index 4a7df600c..709cabfb2 100644
--- a/src/components/layout.css
+++ b/src/components/layout.css
@@ -412,7 +412,10 @@ a.active {
bottom: 105px;
font-size: 10px;
text-decoration: none;
- line-height: 3;
+ min-height: 35px;
+ height: auto;
+ align-content: center;
+ line-height: 1.4;
}
.editPage:hover {
@@ -945,11 +948,3 @@ pre[class*="language-"] {
height: auto;
}
}
-
-#carbon-responsive {
- margin: 0 auto 50px;
-}
-
-#carbon-cover {
- margin: 0 auto 50px;
-}
diff --git a/src/components/sponsorsList.module.css b/src/components/sponsorsList.module.css
index a42c1407d..8cf317d80 100644
--- a/src/components/sponsorsList.module.css
+++ b/src/components/sponsorsList.module.css
@@ -48,6 +48,12 @@
border-radius: 50px;
}
+.add {
+ border: 1px dashed #ccc;
+ border-radius: 50px;
+ font-size: 12px;
+}
+
@media (min-width: 768px) {
.logoGroup {
display: grid;
diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx
index 60be119eb..0351f8e50 100644
--- a/src/pages/[...slug].tsx
+++ b/src/pages/[...slug].tsx
@@ -9,7 +9,6 @@ import StarRepo from "@/components/StarRepo"
import containerStyles from "@/styles/container.module.css"
import typographyStyles from "@/styles/typography.module.css"
import Menu from "@/components/Menu/Menu"
-import CopyMarkdownButton from "@/components/CopyMarkdownButton"
import { Pages } from "@/types/types"
export const getStaticPaths: GetStaticPaths = () => {
@@ -60,7 +59,6 @@ export default function Page({
-
diff --git a/src/types/global.d.ts b/src/types/global.d.ts
index 4fdca5220..5426d0b3f 100644
--- a/src/types/global.d.ts
+++ b/src/types/global.d.ts
@@ -4,15 +4,7 @@ interface Window {
apiKey: string
indexName: string
inputSelector: string
- transformData?: (suggestions: Array<{ url: string; [key: string]: unknown }>) => Array<{ url: string; [key: string]: unknown }>
- handleSelected?: (
- input: HTMLInputElement,
- event: Event,
- suggestion: { url: string; [key: string]: unknown },
- datasetNumber: number,
- context: { selectionMethod: string }
- ) => void
- }) => void
+ }) => vod
}
declare module "*.mdx" {