Chap05 -> Implementing links -> Navigating programmatically
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…
Reference in New Issue