File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
packages/runtime/src/hooks Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import type { FrontMatterMeta } from '@rspress/shared' ;
2- import { usePageData } from './usePageData ' ;
2+ import { usePage } from './usePage ' ;
33
44export const useFrontmatter = ( ) : { frontmatter : FrontMatterMeta } => {
5- const { page } = usePageData ( ) ;
5+ const { page } = usePage ( ) ;
66 const { frontmatter = { } } = page ;
77 return { frontmatter } ;
88} ;
Original file line number Diff line number Diff line change 1- import { usePageData } from './usePageData ' ;
1+ import { usePage } from './usePage ' ;
22
33export function useLang ( ) : string {
4- const { page } = usePageData ( ) ;
4+ const { page } = usePage ( ) ;
55 return page . lang || '' ;
66}
Original file line number Diff line number Diff line change 1- import { usePageData } from './usePageData ' ;
1+ import { usePage } from './usePage ' ;
22
33export function useVersion ( ) : string {
4- const { page } = usePageData ( ) ;
4+ const { page } = usePage ( ) ;
55 return page . version || '' ;
66}
You can’t perform that action at this time.
0 commit comments