@@ -4,16 +4,17 @@ import Header from '@/components/layout/Header';
44import { ResourceConversationAudio } from '@/components/resources/ResourceConversationAudio' ;
55import { Link as i18nLink } from '@/i18n/routing' ;
66import { PROGRESS_STATUS } from '@/lib/constants/enums' ;
7+ import getNextResourceButtonLabel from '@/lib/utils/getNextResourceButtonLabel' ;
78import { RichTextOptions } from '@/lib/utils/richText' ;
89import illustrationCourses from '@/public/illustration_courses.svg' ;
910import { breadcrumbButtonStyle } from '@/styles/common' ;
11+ import { ArrowForward } from '@mui/icons-material' ;
1012import { Box , Button } from '@mui/material' ;
1113import { useTranslations } from 'next-intl' ;
1214import { render , StoryblokRichtext } from 'storyblok-rich-text-react-renderer' ;
1315
1416const audioContainerStyle = {
1517 mt : { xs : 4 , md : 6 } ,
16- mb : 3 ,
1718} as const ;
1819
1920interface ResourceConversationHeaderProps {
@@ -24,6 +25,7 @@ interface ResourceConversationHeaderProps {
2425 resourceProgress : PROGRESS_STATUS ;
2526 audio : { filename : string } ;
2627 audio_transcript : StoryblokRichtext ;
28+ nextResourceHref : string | undefined ;
2729 eventData : { [ key : string ] : any } ;
2830}
2931
@@ -36,6 +38,7 @@ export const ResourceConversationHeader = (props: ResourceConversationHeaderProp
3638 resourceProgress,
3739 audio,
3840 audio_transcript,
41+ nextResourceHref,
3942 eventData,
4043 } = props ;
4144 const t = useTranslations ( 'Resources' ) ;
@@ -56,6 +59,18 @@ export const ResourceConversationHeader = (props: ResourceConversationHeaderProp
5659 audio_transcript = { audio_transcript }
5760 />
5861 </ Box >
62+ { nextResourceHref && (
63+ < Button
64+ variant = "contained"
65+ color = "secondary"
66+ sx = { { width : 'fit-content' , ml : 'auto' } }
67+ href = { nextResourceHref }
68+ endIcon = { < ArrowForward /> }
69+ component = { i18nLink }
70+ >
71+ { t ( getNextResourceButtonLabel ( nextResourceHref ) ) }
72+ </ Button >
73+ ) }
5974 </ Box >
6075 }
6176 imageSrc = { header_image ?. filename || illustrationCourses }
0 commit comments