Skip to content

Commit 3bdf815

Browse files
committed
refactor: simplify getEditPath, auto formatting
1 parent 4f06680 commit 3bdf815

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/lib/utils/editPath.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { join } from 'path'
1+
import { join } from "path"
22

3-
import { CONTENT_DIR, EDIT_CONTENT_URL } from '@/lib/constants'
3+
import { CONTENT_DIR, EDIT_CONTENT_URL } from "@/lib/constants"
44

5-
export const getEditPath = (relativePath: string): string => {
6-
const { href } = new URL(join(CONTENT_DIR, relativePath, "index.md"), EDIT_CONTENT_URL)
7-
return href
8-
}
5+
export const getEditPath = (relativePath: string): string =>
6+
new URL(join(CONTENT_DIR, relativePath, "index.md"), EDIT_CONTENT_URL).href

0 commit comments

Comments
 (0)