Skip to content

Commit 4d56333

Browse files
authored
Display shorter title in Curriculum's table of content when available (#7371)
1 parent 146794d commit 4d56333

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

newIDE/app/src/MainFrame/EditorContainers/HomePage/LearnSection/CourseSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const CourseSection = ({
173173
style={textEllipsisStyle}
174174
color={chapter.isLocked ? 'secondary' : 'primary'}
175175
>
176-
{chapter.title}
176+
{chapter.shortTitle || chapter.title}
177177
</Text>
178178
</Line>
179179
{chapter.isLocked ? (

newIDE/app/src/Utils/GDevelopServices/Asset.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export type CourseChapterTask = {|
189189
export type UnlockedCourseChapter = {|
190190
id: string,
191191
title: string,
192+
shortTitle?: string,
192193
videoUrl: string,
193194
isLocked?: false,
194195
isFree?: boolean,
@@ -198,6 +199,7 @@ export type UnlockedCourseChapter = {|
198199
export type LockedCourseChapter = {|
199200
id: string,
200201
title: string,
202+
shortTitle?: string,
201203
videoUrl: string,
202204
isLocked: true,
203205
isFree?: boolean,

0 commit comments

Comments
 (0)