Chap05 -> Implementing links -> Navigating programmatically
This commit is contained in:
parent
89ea270218
commit
379feb7e99
@ -1,5 +1,6 @@
|
||||
/** @jsxImportSource @emotion/react */
|
||||
import { css } from '@emotion/react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import React from 'react';
|
||||
import { PageTitle } from './PageTitle';
|
||||
@ -21,8 +22,9 @@ export const HomePage = () => {
|
||||
doGetUnansweredQuestion();
|
||||
}, []);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const handleAskQuestionClick = () => {
|
||||
console.log('TODO - move to the AskPage');
|
||||
navigate('ask');
|
||||
};
|
||||
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user