Skip to content

Commit

Permalink
[Design] 주가선택 관련 애니메이션 효과 추가
Browse files Browse the repository at this point in the history
- 주식주문 창의 주가 리스트에서 특정 주가 클릭 시 발생하는 애니메이션 효과 추가

Issues #17
  • Loading branch information
novice1993 committed Sep 9, 2023
1 parent a7eedc4 commit d1e2375
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 2 additions & 4 deletions client/src/components/CentralChartMenu/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import { StateProps } from "../../models/stateProps";

import ExpandScreenBtn from "./ExpandScreenBtn";
import StockOverview from "./StockOverview";
import BookmarkBtn from "./BookmarkBtn";
import StockOrderBtn from "./StockOrderBtn";
import CompareChartBtn from "./CompareChartBtn";
import ChangeChartCycleBtn from "./ChangeChartCycleBtn";

const UpperMenuBar = () => {
const companyId = useSelector((state: StateProps) => state.companyId);
Expand All @@ -21,7 +19,7 @@ const UpperMenuBar = () => {
) : (
<>
<StockOverview />
<BookmarkBtn />
{/* <BookmarkBtn /> */}
<StockOrderBtn type="buying" />
<StockOrderBtn type="selling" />
</>
Expand All @@ -30,7 +28,7 @@ const UpperMenuBar = () => {
</div>
<div className="SecondLine">
<CompareChartBtn />
<ChangeChartCycleBtn />
{/* <ChangeChartCycleBtn /> */}
</div>
</Container>
);
Expand Down
11 changes: 8 additions & 3 deletions client/src/components/StockOrderSection/StockPrice.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect } from "react";
import useGetStockData from "../../hooks/useGetStockData";
import { StockProps } from "../../models/stockProps";

import { useState, useEffect } from "react";
import { useSelector, useDispatch } from "react-redux";
import { styled } from "styled-components";
import { setStockOrderPrice } from "../../reducer/StockOrderPrice-Reducer";
Expand Down Expand Up @@ -98,10 +98,15 @@ const Container = styled.div<{ index: number; price: number; orderPrice: number
height: 36px;
margin-bottom: 2px;
background-color: ${(props) => (props.index > 4 ? "#FDE8E7" : "#E7F0FD")};
border: ${(props) => (props.index === 4 ? "1px solid #2F4F4F" : "none")};
border-left: ${(props) => (props.price === props.orderPrice ? "3px solid red" : props.index > 9 ? "3px solid #FDE8E7" : "3px solid #E7F0FD")};
border: ${(props) => (props.price === props.orderPrice ? "1.5px solid #2F4F4F" : "none")};
border-left: ${(props) => (props.price === props.orderPrice ? "3px solid red" : props.index > 4 ? "3px solid #FDE8E7" : "3px solid #E7F0FD")};
display: flex;
flex-direction: row;
transition: border 1s ease;
&:hover {
cursor: pointer;
}
`;

const Price = styled.div`
Expand Down
4 changes: 3 additions & 1 deletion client/src/reducer/CompanyId-Reducer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { createSlice } from "@reduxjs/toolkit";

const initialState: number = 0;
// 🟢 코스피 API 요청 500번 에러로 인한 임시수정
// const initialState: number = 0;
const initialState: number = 1;

const companyIdSlice = createSlice({
name: "companyId",
Expand Down

0 comments on commit d1e2375

Please sign in to comment.