frontend
frontend copied to clipboard
Add logic to onwards picker
What does this change?
Fixes: https://github.com/guardian/dotcom-rendering/issues/5566
We are looking at using the URL pattern to unblock the fronts work and then work on the agents. The agents would use any services we write to render these routes, so there should be minimal / no waste in code.
This adds the logic that in mostly stored in OnwardsUpper.importable.tsx.
The formatString
is a bit odd, but it's needed as we lose context of the article when bouncing from frontend => DCR => fetch(frontend) => POST DCR
. It will disappear once these are rendered server side as we will be able to use the format in OnwardsPicker
directly with the agents.
I've added a CSROnwardsCollectionResponse
as it will never have trails, and OnwardCollectionResponse
should never have a url
.
I've added a
CSROnwardsCollectionResponse
as it will never have trails
Will DCR use the other properties of the CSROnwardsCollectionResponse
(i.e. heading
, format
, etc.) in the current implementation?
Closing as we are changing tact on this.