From 7dd02a76ead678d60cf6998f63fe0f2930e27a0a Mon Sep 17 00:00:00 2001 From: Yiqing Zhu <793831308@qq.com> Date: Sat, 26 Mar 2022 16:50:56 +1100 Subject: [PATCH] Chap03 -> Handling events -> Handling a button click event --- QandA/frontend/src/HomePage.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/QandA/frontend/src/HomePage.tsx b/QandA/frontend/src/HomePage.tsx index 774e66e..ba6c4fa 100644 --- a/QandA/frontend/src/HomePage.tsx +++ b/QandA/frontend/src/HomePage.tsx @@ -17,14 +17,15 @@ export const HomePage = () => { doGetUnansweredQuestion(); }, []); - console.log('rendered'); + const handleAskQuestionClick = () => { + console.log('TODO - move to the AskPage'); + }; return (
Unanswered Questions - {' '} - {/* This button component is passed as children of Page */} +
{questionsLoading ? (
Loading...