Skip to content

Commit

Permalink
Feature/#355 - 검색어 빈 값 요청 처리, 초기 로딩 시 그래프만 다크모드인 문제 수정 (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
baegyeong authored Dec 4, 2024
2 parents 9fd33ff + 6eaafc5 commit 513c91b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/frontend/src/components/layouts/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const Search = ({ className }: SearchProps) => {

const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (!stockName) return;
refetch();
};

Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/pages/stock-detail/hooks/useChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export const useChart = ({
const containerInstance = containerRef.current;

const { theme } = useContext(ThemeContext);
const graphTheme = theme === 'light' ? lightTheme : darkTheme;
const graphTheme = theme
? theme === 'light'
? lightTheme
: darkTheme
: lightTheme;

useEffect(() => {
if (!containerInstance) return;
Expand Down

0 comments on commit 513c91b

Please sign in to comment.