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 @@ -4,7 +4,6 @@ import { observer } from 'mobx-react-lite';
44import MaterialIcon from '@material/react-material-icon' ;
55import { useHistory , useLocation } from 'react-router-dom' ;
66import StartUpModal from '../../people/utils/StartUpModal' ;
7- import { getHost } from '../../config' ;
87import { useStores } from '../../store' ;
98import { Modal } from '../../components/common' ;
109import SignIn from '../../components/auth/SignIn' ;
@@ -317,8 +316,7 @@ const BountyNavBar: React.FC = () => {
317316 } ;
318317
319318 const handleViewBounties = ( ) => {
320- const host = getHost ( ) ;
321- window . location . href = `https://${ host } /bounties` ;
319+ history . push ( '/bounties' ) ;
322320 setIsMobileMenuOpen ( false ) ;
323321 } ;
324322
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 { getHost } from '../../config ' ;
4+ import { useHistory } from 'react-router-dom ' ;
55
66const HeroContainer = styled . section `
77 background: #1a242e;
@@ -117,14 +117,14 @@ const Button = styled.button<{ variant: 'primary' | 'secondary' }>`
117117
118118const HeroSection : React . FC = ( ) => {
119119 const [ isOpenStartupModal , setIsOpenStartupModal ] = useState ( false ) ;
120+ const history = useHistory ( ) ;
120121
121122 const handleStartEarning = ( ) => {
122123 setIsOpenStartupModal ( true ) ;
123124 } ;
124125
125126 const handleViewBounties = ( ) => {
126- const host = getHost ( ) ;
127- window . location . href = `https://${ host } /bounties` ;
127+ history . push ( '/bounties' ) ;
128128 } ;
129129
130130 return (
You can’t perform that action at this time.
0 commit comments