update icons
parent
efada4719e
commit
24da7d61dd
14
src/App.js
14
src/App.js
|
@ -1,8 +1,4 @@
|
||||||
import {
|
import { DislikeFilled, LikeFilled, RightOutlined } from "@ant-design/icons";
|
||||||
DislikeOutlined,
|
|
||||||
LikeOutlined,
|
|
||||||
RightOutlined,
|
|
||||||
} from "@ant-design/icons";
|
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
import { Badge, Flex, Skeleton } from "antd";
|
import { Badge, Flex, Skeleton } from "antd";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
@ -304,14 +300,14 @@ function App() {
|
||||||
productCharacteristics={product.Characteristics}
|
productCharacteristics={product.Characteristics}
|
||||||
rightComponent={
|
rightComponent={
|
||||||
<div style={{ display: "flex", gap: 12 }}>
|
<div style={{ display: "flex", gap: 12 }}>
|
||||||
<DislikeOutlined
|
<DislikeFilled
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
votes.findIndex(
|
votes.findIndex(
|
||||||
(vote) =>
|
(vote) =>
|
||||||
vote.n === product.Name && vote.t === 0
|
vote.n === product.Name && vote.t === 0
|
||||||
) > -1
|
) > -1
|
||||||
? "red"
|
? "#e74c3c"
|
||||||
: "#000",
|
: "#000",
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -342,14 +338,14 @@ function App() {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<span>{product.Votes}</span>
|
<span>{product.Votes}</span>
|
||||||
<LikeOutlined
|
<LikeFilled
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
votes.findIndex(
|
votes.findIndex(
|
||||||
(vote) =>
|
(vote) =>
|
||||||
vote.n === product.Name && vote.t === 1
|
vote.n === product.Name && vote.t === 1
|
||||||
) > -1
|
) > -1
|
||||||
? "green"
|
? "#27ae60"
|
||||||
: "#000",
|
: "#000",
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
Loading…
Reference in New Issue