From b8507f40db3a8ea57f61c5d6e1a2893aa204bb4b Mon Sep 17 00:00:00 2001 From: gcarron <gcarron@grandlyon.com> Date: Thu, 3 Dec 2020 12:47:25 +0100 Subject: [PATCH] Fix default icon + slider bug --- src/assets/icons/visu/boss/default.svg | 46 ++++++++++----------- src/components/Season/SeasonCardOnGoing.tsx | 5 +-- src/components/Season/SeasonView.tsx | 1 + 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/assets/icons/visu/boss/default.svg b/src/assets/icons/visu/boss/default.svg index 7054c2862..1d323ea1d 100644 --- a/src/assets/icons/visu/boss/default.svg +++ b/src/assets/icons/visu/boss/default.svg @@ -1,24 +1,24 @@ -<svg width="219" height="219" viewBox="0 0 219 219" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M94.17 91.9805H89.79V109.5C89.79 115.338 92.3277 120.583 96.36 124.192V117.401C94.9698 115.094 94.17 112.391 94.17 109.5V91.9805Z" fill="#FFDDBD"/> -<path d="M124.83 91.9805H129.21V109.5C129.21 115.338 126.672 120.583 122.64 124.192V117.401C124.03 115.094 124.83 112.391 124.83 109.5V91.9805Z" fill="#FFDDBD"/> -<path d="M109.5 78.8403H96.1596C91.5427 78.8403 90.5507 83.5072 89.3418 89.1943C89.1942 89.8885 89.0434 90.5979 88.8824 91.3159C88.4666 93.17 88.0188 94.8349 87.6001 96.3603H96.1596L97.2182 118.26H109.5V78.8403Z" fill="#488D4F"/> -<path d="M109.5 118.26H121.782L122.841 96.3603H131.4C130.981 94.8349 130.534 93.17 130.118 91.3159C129.957 90.5983 129.806 89.8892 129.659 89.1954C128.45 83.5082 127.457 78.8403 122.841 78.8403H109.5V118.26Z" fill="#4BBA56"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M109.5 122.64H96.3601L101.91 201.48H107.133V144.713L109.5 136.711V122.64Z" fill="#9A5624"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M109.5 122.64H122.64L117.09 201.48H111.867V144.713L109.5 136.711V122.64Z" fill="#B67D55"/> -<path d="M105.12 70.0801H113.88V82.7201C113.88 82.9962 113.656 83.2201 113.38 83.2201H105.62C105.344 83.2201 105.12 82.9962 105.12 82.7201V70.0801Z" fill="#FFDDBD"/> -<path d="M105.12 70.0801H113.88V81.0301C113.88 82.2396 112.9 83.2201 111.69 83.2201H107.31C106.101 83.2201 105.12 82.2396 105.12 81.0301V70.0801Z" fill="#FFDDBD"/> -<path d="M100.74 78.8403V81.0303C100.74 84.6588 103.681 87.6003 107.31 87.6003H111.69C115.318 87.6003 118.26 84.6588 118.26 81.0303V78.8403H113.88V81.0303C113.88 82.2398 112.899 83.2203 111.69 83.2203H107.31C106.1 83.2203 105.12 82.2398 105.12 81.0303V78.8403H100.74Z" fill="#488D4F"/> -<rect x="105.12" y="74.4604" width="8.76" height="4.38" fill="#F4BA84"/> -<path d="M107.379 201.48H100.945V206.066H96.3601C91.5221 206.066 87.6001 209.488 87.6001 212.636C87.6001 215.291 93.6369 215.025 97.0056 214.877C97.6309 214.849 98.1643 214.826 98.5501 214.826C99.782 214.826 100.261 214.278 100.74 213.731C101.219 213.183 101.698 212.636 102.93 212.636C104.14 212.636 105.12 213.616 105.12 214.826H107.379V201.48Z" fill="#545F7C"/> -<path d="M111.621 201.48H118.055V206.066H122.64C127.478 206.066 131.4 209.488 131.4 212.636C131.4 215.291 126.009 215.025 122.64 214.877C122.015 214.849 121.481 214.826 121.095 214.826C119.863 214.826 119.384 214.278 118.905 213.731C118.426 213.183 117.947 212.636 116.715 212.636C115.506 212.636 114.525 213.616 114.525 214.826H111.621V201.48Z" fill="#6E7B9D"/> -<path d="M70.08 13.1401H148.92C151.339 13.1401 153.3 15.1011 153.3 17.5201V61.3201C153.3 63.7391 151.339 65.7001 148.92 65.7001H140.16V70.0801H118.26V65.7001H70.08C67.6609 65.7001 65.7 63.7391 65.7 61.3201V17.5201C65.7 15.1011 67.6609 13.1401 70.08 13.1401Z" fill="#8A8A8A"/> -<path d="M70.08 21.8999H148.92C151.339 21.8999 153.3 23.8609 153.3 26.2799V70.0799C153.3 72.4989 151.339 74.4599 148.92 74.4599H70.08C67.6609 74.4599 65.7 72.4989 65.7 70.0799V26.2799C65.7 23.8609 67.6609 21.8999 70.08 21.8999Z" fill="#C4C4C4"/> -<rect x="70.0798" y="29.5649" width="52.56" height="35.04" rx="1" fill="#96C5CF"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M118.26 31.7549H74.4598C73.2503 31.7549 72.2698 32.7354 72.2698 33.9449V62.5518C72.2698 63.7613 73.2503 64.7418 74.4598 64.7418H118.26C119.469 64.7418 120.45 63.7613 120.45 62.5518V33.9449C120.45 32.7354 119.469 31.7549 118.26 31.7549ZM74.4598 29.5649C72.0408 29.5649 70.0798 31.5259 70.0798 33.9449V62.5518C70.0798 64.9708 72.0408 66.9318 74.4598 66.9318H118.26C120.679 66.9318 122.64 64.9708 122.64 62.5518V33.9449C122.64 31.5259 120.679 29.5649 118.26 29.5649H74.4598Z" fill="#43595E"/> -<path opacity="0.85" d="M90.1028 31.8921H96.36L80.7171 64.6052H74.46L90.1028 31.8921Z" fill="white"/> -<path opacity="0.85" d="M102.2 31.8921H105.12L90.5199 64.6052H87.5999L102.2 31.8921Z" fill="white"/> -<ellipse cx="142.35" cy="58.0353" rx="6.57" ry="6.57" fill="#464646"/> -<path d="M146.418 58.5825C146.576 58.2133 146.662 57.8159 146.662 57.402C146.662 55.446 144.747 53.8604 142.384 53.8604C140.022 53.8604 138.107 55.446 138.107 57.402C138.107 57.8159 138.193 58.2133 138.35 58.5825C138.938 57.207 140.522 56.2214 142.384 56.2214C144.247 56.2214 145.831 57.207 146.418 58.5825Z" fill="#C4C4C4"/> -<rect x="135.78" y="30.6602" width="13.14" height="8.76" rx="0.5" fill="black"/> -<rect x="128.115" y="13.1401" width="2.19002" height="61.32" fill="#8A8A8A"/> +<svg width="23" height="51" viewBox="0 0 23 51" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M7.65005 20.0996H6.55005V24.4996C6.55005 25.9656 7.18736 27.2828 8.20005 28.1892V26.4838C7.8509 25.9043 7.65005 25.2254 7.65005 24.4996V20.0996Z" fill="#FFDDBD"/> +<path d="M15.35 20.0996H16.45V24.4996C16.45 25.9656 15.8127 27.2828 14.8 28.1892V26.4838C15.1492 25.9043 15.35 25.2254 15.35 24.4996V20.0996Z" fill="#FFDDBD"/> +<path d="M11.5 16.7998H8.14965C6.99016 16.7998 6.74102 17.9718 6.43741 19.4001C6.40035 19.5745 6.36247 19.7526 6.32204 19.9329C6.21761 20.3986 6.10514 20.8167 6 21.1998H8.14965L8.41551 26.6998H11.5V16.7998Z" fill="#488D4F"/> +<path d="M11.5 26.6998H14.5845L14.8504 21.1998H17C16.8949 20.8167 16.7824 20.3986 16.678 19.9329C16.6375 19.7527 16.5997 19.5746 16.5627 19.4004C16.259 17.9721 16.0098 16.7998 14.8504 16.7998H11.5V26.6998Z" fill="#4BBA56"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 27.7998H8.19995L9.59374 47.5998H10.9055V33.3431L11.5 31.3337V27.7998Z" fill="#9A5624"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 27.7998H14.8L13.4063 47.5998H12.0945V33.3431L11.5 31.3337V27.7998Z" fill="#B67D55"/> +<path d="M10.4 14.5996H12.6V17.3996C12.6 17.6758 12.3762 17.8996 12.1 17.8996H10.9C10.6239 17.8996 10.4 17.6758 10.4 17.3996V14.5996Z" fill="#FFDDBD"/> +<path d="M10.4 14.5996H12.6V17.3496C12.6 17.6534 12.3538 17.8996 12.05 17.8996H10.95C10.6463 17.8996 10.4 17.6534 10.4 17.3496V14.5996Z" fill="#FFDDBD"/> +<path d="M9.30005 16.7998V17.3498C9.30005 18.2611 10.0388 18.9998 10.95 18.9998H12.05C12.9613 18.9998 13.7 18.2611 13.7 17.3498V16.7998H12.6V17.3498C12.6 17.6536 12.3538 17.8998 12.05 17.8998H10.95C10.6463 17.8998 10.4 17.6536 10.4 17.3498V16.7998H9.30005Z" fill="#488D4F"/> +<rect x="10.4" y="15.6997" width="2.2" height="1.1" fill="#F4BA84"/> +<path d="M10.9672 47.5996H9.35156V48.7512H8.2C6.98497 48.7512 6 49.6105 6 50.4012C6 51.068 7.5161 51.0012 8.3621 50.964C8.51916 50.9571 8.65312 50.9512 8.75 50.9512C9.05937 50.9512 9.17969 50.8137 9.3 50.6762C9.42031 50.5387 9.54062 50.4012 9.85 50.4012C10.1538 50.4012 10.4 50.6474 10.4 50.9512H10.9672V47.5996Z" fill="#545F7C"/> +<path d="M12.0328 47.5996H13.6484V48.7512H14.8C16.015 48.7512 17 49.6105 17 50.4012C17 51.068 15.646 51.0012 14.8 50.964C14.6429 50.9571 14.509 50.9512 14.4121 50.9512C14.1027 50.9512 13.9824 50.8137 13.8621 50.6762C13.7418 50.5387 13.6215 50.4012 13.3121 50.4012C13.0083 50.4012 12.7621 50.6474 12.7621 50.9512H12.0328V47.5996Z" fill="#6E7B9D"/> +<path d="M1.6 0.299805H21.4C22.0075 0.299805 22.5 0.792292 22.5 1.3998V12.3998C22.5 13.0073 22.0075 13.4998 21.4 13.4998H19.2V14.5998H13.7V13.4998H1.6C0.992487 13.4998 0.5 13.0073 0.5 12.3998V1.3998C0.5 0.792291 0.992486 0.299805 1.6 0.299805Z" fill="#8A8A8A"/> +<path d="M1.6 2.5H21.4C22.0075 2.5 22.5 2.99249 22.5 3.6V14.6C22.5 15.2075 22.0075 15.7 21.4 15.7H1.6C0.992487 15.7 0.5 15.2075 0.5 14.6V3.6C0.5 2.99249 0.992486 2.5 1.6 2.5Z" fill="#C4C4C4"/> +<rect x="1.59998" y="4.4248" width="13.2" height="8.8" rx="1" fill="#96C5CF"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M13.7 4.9748H2.69998C2.39622 4.9748 2.14998 5.22105 2.14998 5.5248V12.7092C2.14998 13.0129 2.39622 13.2592 2.69998 13.2592H13.7C14.0037 13.2592 14.25 13.0129 14.25 12.7092V5.5248C14.25 5.22105 14.0037 4.9748 13.7 4.9748ZM2.69998 4.4248C2.09246 4.4248 1.59998 4.91729 1.59998 5.5248V12.7092C1.59998 13.3167 2.09246 13.8092 2.69998 13.8092H13.7C14.3075 13.8092 14.8 13.3167 14.8 12.7092V5.5248C14.8 4.91729 14.3075 4.4248 13.7 4.4248H2.69998Z" fill="#43595E"/> +<path opacity="0.85" d="M6.62852 5.00928H8.19995L4.27138 13.2249H2.69995L6.62852 5.00928Z" fill="white"/> +<path opacity="0.85" d="M9.66667 5.00928H10.4L6.73333 13.2249H6L9.66667 5.00928Z" fill="white"/> +<ellipse cx="19.75" cy="11.5748" rx="1.65" ry="1.65" fill="#464646"/> +<path d="M20.7716 11.7123C20.8112 11.6196 20.8328 11.5198 20.8328 11.4158C20.8328 10.9246 20.3518 10.5264 19.7585 10.5264C19.1653 10.5264 18.6843 10.9246 18.6843 11.4158C18.6843 11.5198 18.7059 11.6196 18.7455 11.7123C18.8929 11.3668 19.2908 11.1193 19.7585 11.1193C20.2263 11.1193 20.6242 11.3668 20.7716 11.7123Z" fill="#C4C4C4"/> +<rect x="18.1" y="4.69971" width="3.3" height="2.2" rx="0.5" fill="black"/> +<rect x="16.175" y="0.299805" width="0.549995" height="15.4" fill="#8A8A8A"/> </svg> diff --git a/src/components/Season/SeasonCardOnGoing.tsx b/src/components/Season/SeasonCardOnGoing.tsx index 2afbad70e..be1bab21a 100644 --- a/src/components/Season/SeasonCardOnGoing.tsx +++ b/src/components/Season/SeasonCardOnGoing.tsx @@ -15,7 +15,7 @@ import actionIcon from 'assets/icons/visu/season/actionIcon.svg' import StarsContainer from './StarsContainer' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import { importIconbyId } from 'utils/utils' -import defaultIcon from 'assets/icons/visu/season/seasonLocked.svg' +import defaultIcon from 'assets/icons/visu/boss/default.svg' import starFilledIcon from 'assets/icons/visu/season/starFilled.svg' import Icon from 'cozy-ui/transpiled/react/Icon' import { UserBossState } from 'enum/userBoss.enum' @@ -74,12 +74,11 @@ const SeasonCardOnGoing: React.FC<SeasonCardOnGoingProps> = ({ useEffect(() => { importIconbyId(userSeason.boss.id).then(icon => { - setBossIcon(icon) + icon ? setBossIcon(icon) : setBossIcon(defaultIcon) }) }, [userSeason]) //TODO change icon and stars when finished - console.log('us', userSeason) return ( <div className="cardContent onGoing"> <div className="titleBlock"> diff --git a/src/components/Season/SeasonView.tsx b/src/components/Season/SeasonView.tsx index a7da16584..21b597bb7 100644 --- a/src/components/Season/SeasonView.tsx +++ b/src/components/Season/SeasonView.tsx @@ -81,6 +81,7 @@ const SeasonView: React.FC = () => { moveSliderLeft() } } + resetValues() } // eslint-disable-next-line @typescript-eslint/no-explicit-any const handleClickOrTouchMove = (e: any) => { -- GitLab