Skip to content
Open
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
12 changes: 9 additions & 3 deletions com-dict-client/src/components/WordHome/wordDay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { Typography, Card, Row, Col, Divider } from "antd";
import {
SoundOutlined,
AudioMutedOutlined,
// LikeOutlined,
// DislikeOutlined,
} from "@ant-design/icons";
Expand Down Expand Up @@ -155,9 +156,14 @@ function wordDay({ data }) {
type="vertical"
style={{ height: "4vmin" }}
></Divider>
<SoundOutlined
style={{ fontSize: "3.5vmin", fontWeight: "bold" }}
/>
{!data.pronunciation ? (
<SoundOutlined
onClick={() => new Audio(data.pronunciation).play()}
style={{ fontSize: "3.5vmin", fontWeight: "bold" }}
/>
) : (
<AudioMutedOutlined style={{ fontSize: "3.5vmin", fontWeight: "bold" }} />
)}
</Row>
<Row style={{ paddingTop: "4vmin" }}>
<Col xl={16} lg={16} md={16} sm={24} xs={24}>
Expand Down