-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat: add kvasir support to smart title hook #4156
feat: add kvasir support to smart title hook #4156
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
queryKey: queryKey || getPostByIdKey(post?.id), | ||
queryType: queryKey ? 'feed' : 'post', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to update translation
for currently shown post that is passed as a prop to useSmartTitle
so if we are in feed I use feed mode and else just single post
const [translateResult] = await fetchTranslations([post]); | ||
|
||
client.setQueryData(key, translateResult?.value || post?.title); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetch from kvasir directly, it will return the correct one depending on the clickbait shield setting
export const useTranslation: UseTranslation = ({ | ||
queryKey, | ||
queryType, | ||
clickbaitShieldEnabled: clickbaitShieldEnabledProp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to manually control which title we request
Changes
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Preview domain
https://as-966-smart-title-hook-kvasir.preview.app.daily.dev