diff --git a/src/frontend/src/components/Homepage/Cards.tsx b/src/frontend/src/components/Homepage/Cards.tsx index 6cc3585b..488e2ac5 100644 --- a/src/frontend/src/components/Homepage/Cards.tsx +++ b/src/frontend/src/components/Homepage/Cards.tsx @@ -97,6 +97,17 @@ export const FeatureCard = (props: Props) => { export const TextFieldCard = ({ className, ...props }: CardProps) => { const appStateContext = React.useContext(AppStateContext); + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === 'Enter') { + if (appStateContext?.state.researchTopic?.trim()) { + appStateContext.dispatch({ + type: 'UPDATE_SIDEBAR_SELECTION', + payload: SidebarOptions.Article, + }); + } + } + }; + return ( { flex: 1, width: "100%", }} + onKeyDown={handleKeyDown} />