Skip to content
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

Missing type for the redirect inside renderingContent #217

Open
krzysztofkaszanek opened this issue Jan 24, 2025 · 0 comments
Open

Missing type for the redirect inside renderingContent #217

krzysztofkaszanek opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@krzysztofkaszanek
Copy link

Version

@nuxtjs/algolia: 1.10.2
nuxt: 3.15.1

Steps to reproduce

  1. Try to access the redirect property of listing.renderingContent.
  2. Get the type error that redirect does not exist on type of renderingContent

What is Expected?

It's possible to define a redirect rule in Algolia. https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/#create-a-rule-with-the-api
If it's defined, the response will contain the redirect object inside renderingContent:

...
renderingContent: {
    ...
    redirect: {
        url: '/a/redirect/path/'
    }
}

The type for redirect should be defined in renderingContent: https://github.com/nuxt-modules/algolia/blob/main/src/types.ts#L630

What is actually happening?

I get the type error when trying to use renderingContent.redirect.url

@krzysztofkaszanek krzysztofkaszanek added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant