@@ -14,17 +14,31 @@ import ThumbsUp from "./ThumbsUp.svg";
1414import ThumbsDown from "./ThumbsDown.svg" ;
1515import clsx from "clsx" ;
1616import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
17+ import { useLocation } from "@docusaurus/router" ;
1718const { TextArea } = Input ;
19+ function Alarm ( ) {
20+ return (
21+ < svg
22+ style = { { width : "18px" } }
23+ xmlns = "http://www.w3.org/2000/svg"
24+ viewBox = "0 0 512 512"
25+ fill = "currentColor"
26+ >
27+ < path d = "M506.3 417l-213.3-364C284.8 39 270.4 32 256 32C241.6 32 227.2 39 218.1 53l-213.2 364C-10.59 444.9 9.851 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM52.58 432L255.1 84.8L459.4 432H52.58zM256 337.1c-17.36 0-31.44 14.08-31.44 31.44c0 17.36 14.11 31.44 31.48 31.44s31.4-14.08 31.4-31.44C287.4 351.2 273.4 337.1 256 337.1zM232 184v96C232 293.3 242.8 304 256 304s24-10.75 24-24v-96C280 170.8 269.3 160 256 160S232 170.8 232 184z" > </ path >
28+ </ svg >
29+ ) ;
30+ }
1831export default function DocPaginator ( props ) {
1932 const { previous, next } = props ;
2033 const [ loading , setLoading ] = useState ( false ) ;
2134 const [ isVoted , setIsVoted ] = useState ( false ) ;
2235 const [ form ] = Form . useForm ( ) ;
2336 const {
2437 siteConfig : {
25- customFields : { isChina } ,
38+ customFields : { isChina, site } ,
2639 } ,
2740 } = useDocusaurusContext ( ) as any ;
41+ const { pathname } = useLocation ( ) ;
2842 function popover ( ) {
2943 return (
3044 < div style = { { width : "390px" , textAlign : "center" } } >
@@ -138,6 +152,15 @@ export default function DocPaginator(props) {
138152 </ div >
139153 </ div >
140154 ) }
155+ < Button
156+ target = "_blank"
157+ rel = "noopener noreferrer"
158+ href = { `https://github.com/databendlabs/databend-docs/issues/new?title=Issue on docs, site=${ site } &body=Path: ${ pathname } ` }
159+ className = { styles . RaiseButton }
160+ >
161+ < Alarm />
162+ { $t ( "Raise issue" ) }
163+ </ Button >
141164 </ div >
142165 </ Spin >
143166 < nav
0 commit comments