Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#355 - 검색어 빈 값 요청 처리, 초기 로딩 시 그래프만 다크모드인 문제 수정 #357

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버쪽에도 막아야하는데... 한번 해볼게요!

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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?를 연속해서 쓸 수 있군요

? lightTheme
: darkTheme
: lightTheme;

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