update icons

main
alex 2024-05-30 16:44:53 +02:00
parent efada4719e
commit 24da7d61dd
1 changed files with 5 additions and 9 deletions

View File

@ -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={() => {