Skip to content

feat(client): provide client data aliases and utils #1645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meteorlxy
Copy link
Member

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Documentation update
  • Other

Description

Closes #1632

Screenshots

N/A

Copy link

Pull Request Test Coverage Report for Build 14589051312

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 72.198%

Totals Coverage Status
Change from base Build 14588827585: 0.0%
Covered Lines: 648
Relevant Lines: 903

💛 - Coveralls

Copy link
Member

@Mister-Hope Mister-Hope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page for pageData alias shall also be added

@@ -103,35 +103,59 @@ export const setupGlobalComputed = (
routes,
siteData,
siteLocaleData,

/* Aliases */
frontmatter: pageFrontmatter,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page is missing here

@@ -46,3 +46,11 @@ export const useSiteData = (): SiteDataRef => useClientData().siteData

export const useSiteLocaleData = (): SiteLocaleDataRef =>
useClientData().siteLocaleData

/* Aliases */
export const useData = useClientData
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants