Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the story's title #360

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions pages/kids/stories/pdf/[storyId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const MOVAPP_TAGLINE: Record<string, string> = {

const StoryPage = ({ story, storyData }: StoriesProps): JSX.Element => {
const { t } = useTranslation();
const { currentLanguage } = useLanguage();
const { currentLanguage, otherLanguage } = useLanguage();

const StoryImage: FunctionComponent = () => {
// NextImage does not work properly in PDFs, we use a regular <img> element instead
Expand All @@ -57,12 +57,8 @@ const StoryPage = ({ story, storyData }: StoriesProps): JSX.Element => {
{story ? (
<tr className="break-inside-avoid">
<td className="align-top p-2 min-w-[100px]" />
<td className="align-top p-2 text-2xl font-bold">
{currentLanguage === 'uk' ? story.title.uk : story.title[currentLanguage]}
</td>
<td className="align-top p-2 text-2xl font-bold">
{currentLanguage === 'uk' ? story.title[currentLanguage] : story.title.uk}
</td>
<td className="align-top p-2 text-2xl font-bold">{story.title[currentLanguage]}</td>
<td className="align-top p-2 text-2xl font-bold">{story.title[otherLanguage]}</td>
</tr>
) : null}
{story
Expand Down
Loading