-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
85 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { AudioPlayer } from './AudioPlayer' | ||
|
||
export { AudioPlayer } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/features/worddefinition/components/Meaning/Meaning.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { useMemo } from 'react' | ||
import { Box, BoxProps } from '@chakra-ui/react' | ||
|
||
import useWordContext from 'hooks/useWordContext' | ||
|
||
interface Props extends BoxProps { | ||
children: React.ReactNode | ||
} | ||
|
||
export function Meaning({ ...props }: Props) { | ||
const { wordDefinition = { data: [] } } = useWordContext() | ||
const [word] = wordDefinition.data | ||
|
||
return ( | ||
<Box {...props}> | ||
{word.meanings.map(meaning => { | ||
return meaning.partOfSpeech | ||
})} | ||
</Box> | ||
) | ||
} | ||
|
||
export default Meaning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Meaning } from './Meaning' | ||
|
||
export { Meaning } |
23 changes: 23 additions & 0 deletions
23
src/features/worddefinition/components/MeaningNavigation/MeaningNavigation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { useMemo } from 'react' | ||
import { Box, BoxProps } from '@chakra-ui/react' | ||
|
||
import useWordContext from 'hooks/useWordContext' | ||
|
||
interface Props extends BoxProps { | ||
children: React.ReactNode | ||
} | ||
|
||
export function MeaningNavigation({ ...props }: Props) { | ||
const { wordDefinition = { data: [] } } = useWordContext() | ||
const [word] = wordDefinition.data | ||
|
||
return ( | ||
<Box {...props}> | ||
{word.meanings.map(meaning => { | ||
return meaning.partOfSpeech | ||
})} | ||
</Box> | ||
) | ||
} | ||
|
||
export default MeaningNavigation |
3 changes: 3 additions & 0 deletions
3
src/features/worddefinition/components/MeaningNavigation/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { MeaningNavigation } from './MeaningNavigation' | ||
|
||
export { MeaningNavigation } |
6 changes: 2 additions & 4 deletions
6
src/features/wordslist/components/FavoritesList/FavoritesList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters