Skip to content

Comments

Ws 2103 uas spike#13721

Draft
jinidev wants to merge 2 commits intolatestfrom
ws-2103-UAS-spike
Draft

Ws 2103 uas spike#13721
jinidev wants to merge 2 commits intolatestfrom
ws-2103-UAS-spike

Conversation

@jinidev
Copy link
Contributor

@jinidev jinidev commented Feb 16, 2026

Resolves JIRA: https://bbc.atlassian.net/browse/WS-2103

Summary

Spike based draft PR for "Save for later" functionality in article page

Code changes

Introudced new API uiltity library for UAS Apis
New "Save for later" button in article page - with its "saved", "unsaved" form based on user requests
Lists saved articles in homepage

Testing

image ************************************************************************************************************** image ************************************************************************************************************** image

const { service } = useContext(ServiceContext);
const [savedArticles, setSavedArticles] = useState<any[]>([]);

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Have we considered fetching the articles in the server side? e.g. https://github.com/bbc/simorgh/blob/latest/ws-nextjs-app/pages/%5Bservice%5D/homepage/handleHomepageRoute.ts#L19

We should be able to get the access token via context.req.headers.cookie.
And then potentially we could pass savedArticles as props?

That way we wouldn't have loading state or the layout shift.

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