File tree Expand file tree Collapse file tree
src/components/BountyComponents Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ const BountyNavBar: React.FC = () => {
316316 } ;
317317
318318 const handleViewBounties = ( ) => {
319- window . location . href = ` ${ window . location . origin } /bounties` ;
319+ history . push ( ' /bounties' ) ;
320320 setIsMobileMenuOpen ( false ) ;
321321 } ;
322322
Original file line number Diff line number Diff line change 11import React , { useState } from 'react' ;
22import styled from 'styled-components' ;
33import StartUpModal from '../../people/utils/StartUpModal' ;
4+ import { useHistory } from 'react-router-dom' ;
45
56const HeroContainer = styled . section `
67 background: #1a242e;
@@ -116,13 +117,14 @@ const Button = styled.button<{ variant: 'primary' | 'secondary' }>`
116117
117118const HeroSection : React . FC = ( ) => {
118119 const [ isOpenStartupModal , setIsOpenStartupModal ] = useState ( false ) ;
120+ const history = useHistory ( ) ;
119121
120122 const handleStartEarning = ( ) => {
121123 setIsOpenStartupModal ( true ) ;
122124 } ;
123125
124126 const handleViewBounties = ( ) => {
125- window . location . href = ` ${ window . location . origin } /bounties` ;
127+ history . push ( ' /bounties' ) ;
126128 } ;
127129
128130 return (
You can’t perform that action at this time.
0 commit comments