Skip to content

Commit

Permalink
passage nav localization
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Dec 5, 2024
1 parent e35572b commit c19d044
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/organisms/passageNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import clsx from 'clsx';
import React, { useRef, useState } from 'react';
import React, { useState } from 'react';
import { FormattedMessage } from 'react-intl';

import Link from '~components/atoms/linkWithoutPrefetch';

Expand All @@ -23,13 +24,21 @@ export default function PassageNavigation({ books }: Props): JSX.Element {
className={clsx({ active: selectedView === 'grid' })}
onClick={() => setSelectedView('grid')}
>
Grid
<FormattedMessage
id="passageNavigation__selector-grid"
defaultMessage="Grid"
description="Switch to grid view"
/>
</button>
<button
className={clsx({ active: selectedView === 'list' })}
onClick={() => setSelectedView('list')}
>
List
<FormattedMessage
id="passageNavigation__selector-list"
defaultMessage="List"
description="Switch to list view"
/>
</button>
</div>

Expand Down

0 comments on commit c19d044

Please sign in to comment.