Skip to content

Commit

Permalink
종목랭킹 글자 색 변경
Browse files Browse the repository at this point in the history
빨간색, 파란색을 더 부드러운 색상으로 변경
Issues #19
  • Loading branch information
김병현 authored and 김병현 committed Sep 19, 2023
1 parent cc1ae1c commit 52f1ce9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions client/src/components/MarketComponents/MarketStockList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ const StockDetailItem = styled.div<{
color: ${({ variation }) => {
switch (variation) {
case "positive":
return "red";
return "#e22926";
case "negative":
return "blue";
return "#2679ed";
case "neutral":
default:
return "black";
Expand Down
1 change: 0 additions & 1 deletion client/src/components/watchlist/StockItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const StockItem: React.FC<StockItemProps> = ({ company, onDelete }) => {
const handleDelete = () => {
deleteMutation.mutate(company.companyId, {
onSuccess: () => {
console.log("Delete successful!"); // 여기가 출력되는지 확인
onDelete(company.companyId); // 콜백 함수 호출
}
});
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/watchlist/WatchList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ const WatchList: React.FC<WatchListProps> = ({ currentListType, onChangeListType
}, [starredData]);

useEffect(() => {
console.log("Updated starredCompanyIds:", starredCompanyIds); // 여기가 출력되는지 확인

}, [starredCompanyIds]);

const handleCompanyDelete = (deletedCompanyId: number) => {
console.log("Company ID to delete:", deletedCompanyId); // 여기가 출력되는지 확인

setStarredCompanyIds(prevState => prevState.filter(id => id !== deletedCompanyId));
};
return (
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useGetMemberInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function useGetMemberInfo() {
return useQuery(['member'], async () => {
const accessToken = localStorage.getItem('accessToken'); // 로컬 스토리지에서 AuthToken 가져오기

console.log(accessToken);


const response = await axios.get(`http://ec2-13-125-246-160.ap-northeast-2.compute.amazonaws.com:8080/members`, {
headers: {
Expand Down
5 changes: 1 addition & 4 deletions client/src/hooks/useGetStockInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ const useGetStockInfo = (companyId: number) => {
const { data, isLoading, error, refetch } = useQuery(`stockInfo${companyId} ${queryKey}}`, () => getStockInfo(companyId), {
enabled: true,
refetchInterval: autoRefetch ? 60000 * 10 : false, // 정각 혹은 30분에 맞춰서 10분 마다 데이터 리패칭
// onSuccess: () => {
// console.log(new Date());
// console.log(data);
// },

});

return { stockInfo: data, stockInfoLoading: isLoading, stockInfoError: error };
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useTradeStock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default useTradeStock;

const postOrderRequest = async (orderType: boolean, companyId: number, price: number, volume: number) => {
const accessToken = localStorage.getItem("accessToken");
console.log(accessToken);

const options = {
headers: {
Authorization: `${accessToken}`,
Expand Down
2 changes: 1 addition & 1 deletion client/src/page/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const MainPage = () => {
const dispatch = useDispatch();

const isLogin = useSelector((state: RootState) => state.login);
console.log(isLogin);


// 🔴 페이지 로드 시 로컬 스토리지의 토큰을 기반으로 로그인 상태를 확인합니다.
useEffect(() => {
Expand Down

0 comments on commit 52f1ce9

Please sign in to comment.