@@ -44,7 +44,7 @@ const StoryCardImage = React.forwardRef<HTMLImageElement, StoryCardImageProps>(
4444 const storyData = useStoryCardContext ( ) ;
4545
4646 return (
47- < Link href = { storyData . slug } className = "mb-2 w-full" >
47+ < Link href = { `/story/ ${ storyData . id } ` } className = "mb-2 w-full" >
4848 < AspectRatio ratio = { 16 / 9 } >
4949 < img
5050 ref = { forwardedRef }
@@ -76,10 +76,10 @@ StoryCardSection.displayName = "StoryCardSection";
7676
7777const StoryCardTitle = React . forwardRef < React . ElementRef < typeof Heading > , HeadingBaseProps > (
7878 ( { className, weight = "h3" , ...props } , forwardedRef ) => {
79- const { headline, slug } = useStoryCardContext ( ) ;
79+ const { headline, id } = useStoryCardContext ( ) ;
8080
8181 return (
82- < Link href = { `https://www.newslaundry.com/ ${ slug } ` } className = "line-clamp-2" >
82+ < Link href = { `/story/ ${ id } ` } className = "line-clamp-2" >
8383 < Heading
8484 ref = { forwardedRef }
8585 weight = { weight }
@@ -138,12 +138,7 @@ const Authors = ({ authors }: { authors: StoryCardProps["authors"] }) => {
138138 < Text className = "line-clamp-1 w-full text-sm font-medium" >
139139 { authors . map ( author => {
140140 return (
141- < Link
142- key = { author . id }
143- href = { `https://www.newslaundry.com/${ author . slug } ` }
144- title = { author . name }
145- className = "inline-block"
146- >
141+ < Link key = { author . id } href = { `/author/${ author . id } ` } title = { author . name } className = "inline-block" >
147142 { author . name }
148143 </ Link >
149144 ) ;
@@ -155,19 +150,11 @@ const Authors = ({ authors }: { authors: StoryCardProps["authors"] }) => {
155150 if ( authors . length === 2 ) {
156151 return (
157152 < Text className = "line-clamp-1 w-full text-sm font-medium" >
158- < Link
159- href = { `https://www.newslaundry.com/${ authors [ 0 ] . slug } ` }
160- title = { authors [ 0 ] . name }
161- className = "inline-block"
162- >
153+ < Link href = { `/author/${ authors [ 0 ] . id } ` } title = { authors [ 0 ] . name } className = "inline-block" >
163154 { authors [ 0 ] . name }
164155 </ Link >
165156 < span className = "mx-1" > & </ span >
166- < Link
167- href = { `https://www.newslaundry.com/${ authors [ 1 ] . slug } ` }
168- title = { authors [ 1 ] . name }
169- className = "inline-block"
170- >
157+ < Link href = { `/author/${ authors [ 1 ] . id } ` } title = { authors [ 1 ] . name } className = "inline-block" >
171158 { authors [ 1 ] . name }
172159 </ Link >
173160 </ Text >
@@ -179,11 +166,7 @@ const Authors = ({ authors }: { authors: StoryCardProps["authors"] }) => {
179166 { authors . slice ( 0 , authors . length - 1 ) . map ( ( author , i ) => {
180167 return (
181168 < React . Fragment key = { author . id } >
182- < Link
183- href = { `https://www.newslaundry.com/${ author . slug } ` }
184- title = { author . name }
185- className = "inline-block"
186- >
169+ < Link href = { `/author/${ author . id } ` } title = { author . name } className = "inline-block" >
187170 { author . name }
188171 </ Link >
189172 { i !== authors . length - 2 ? < span className = "mr-1" > ,</ span > : null }
@@ -192,7 +175,7 @@ const Authors = ({ authors }: { authors: StoryCardProps["authors"] }) => {
192175 } ) }
193176 < span className = "mx-1" > & </ span >
194177 < Link
195- href = { `https://www.newslaundry.com/ ${ authors [ authors . length - 1 ] . slug } ` }
178+ href = { `/author/ ${ authors [ authors . length - 1 ] . id } ` }
196179 title = { authors [ authors . length - 1 ] . name }
197180 className = "inline-block"
198181 >
0 commit comments