Skip to content

Commit 86987bb

Browse files
authored
fix: 언어코드 기반으로 stlye 가져오도록 수정 (#81) (#82)
1 parent 2fb1ad0 commit 86987bb

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/apis/ttsVoice.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ export const ttsLanguage = async (): Promise<Language[]> => {
3131
}
3232
};
3333

34-
export const ttsStyle = async (): Promise<Style[]> => {
34+
export const ttsStyle = async (selectedLanguage: string): Promise<Style[]> => {
3535
try {
36-
const response = await apiClient.get('/style');
36+
const response = await apiClient.get(
37+
`/style/search?languagecode=${selectedLanguage}`
38+
);
3739
return response.data.response.styleList;
3840
} catch (error) {
3941
console.error(error);

src/components/common/VoiceSelectPopover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const VoiceSelectionPopover: React.FC<VoiceSelectionPopoverProps> = ({
9494
if (selectedLanguage) {
9595
const fetchStyles = async () => {
9696
try {
97-
const styleData = await ttsStyle();
97+
const styleData = await ttsStyle(selectedLanguage);
9898
const updatedStyles = styleData.map((style: Style) => ({
9999
...style,
100100
mood:

0 commit comments

Comments
 (0)