Skip to content

Commit

Permalink
fix edit on page (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarhkVoyd authored Jun 13, 2024
1 parent df7aee2 commit 7680d32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/DocsHelp.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useRouter } from 'next/router';
import React, { FormEvent, useRef, useState } from 'react';
import extractPathWithoutFragment from '~/lib/extractPathWithoutFragment';

interface DocsHelpProps {
markdownFile?: string;
Expand Down Expand Up @@ -275,7 +276,7 @@ export function DocsHelp({ markdownFile }: DocsHelpProps) {
target='_blank'
rel='noreferrer'
className='px-[16px] py-[8px] cursor-pointer border-solid border-[#aaaaaa] border rounded-md hover:bg-gray-200 dark:hover:bg-gray-600'
href={`https://github.com/json-schema-org/website/blob/main/pages${markdownFile ? (markdownFile === '_indexPage' ? router.asPath + '/_index.md' : router.asPath + '.md') : `/${path}/index.page.tsx`}`}
href={`https://github.com/json-schema-org/website/blob/main/pages${markdownFile ? (markdownFile === '_indexPage' ? extractPathWithoutFragment(router.asPath) + '/_index.md' : extractPathWithoutFragment(router.asPath) + '.md') : `/${path}/index.page.tsx`}`}
>
<svg
className='inline-block select-none align-text-bottom mr-1'
Expand Down

0 comments on commit 7680d32

Please sign in to comment.