This is 1:1 from sdk remix but with react-router imports to unlock step-by-step migration to react-router v7