import styled from "@emotion/styled"; import React, { useEffect, useState } from "react"; import { DARK_TERTIARY_ONE, DARK_TERTIARY_THREE, DARK_TERTIARY_TWO, } from "../../../shared/colors"; import { PlatformProps } from "../../../shared/types"; import withPlatform from "../../platform/withPlatform"; type Props = { animated?: boolean; width: string; height: string; } & PlatformProps; const COLORS = [ DARK_TERTIARY_TWO, DARK_TERTIARY_THREE, DARK_TERTIARY_TWO, DARK_TERTIARY_ONE, ]; function Logo(props: Props) { const [offset, setOffset] = useState(0); useEffect(() => { const intervalId = props.animated ? setInterval(() => { setOffset((offset + 1) % 4); }, 300) : undefined; return () => { if (intervalId) { clearInterval(intervalId); } }; }); return ( ); } export default withPlatform(Logo); const Svg = styled.svg``; const Path = styled.path<{ color: string }>` fill: ${(props) => props.color}; transition: fill 0.3s ease; `;