Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): ProgressBar,SponsoredBy js->t
fixing #109
- Loading branch information
1 parent
dddface
commit 52f6a1f
Showing
4 changed files
with
103 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from "react"; | ||
import { useSelector } from "react-redux"; | ||
import "../styles/components/userSuggestionFollowdBySponsoredBy.css"; | ||
import GoogleImage from "../assets/Images/google_image.jpg"; | ||
import { AppState } from "../services/redux"; | ||
|
||
const SponsoredBy = (): JSX.Element => { | ||
const mainPageMessageOnOffState = useSelector( | ||
(state: AppState) => state.changeMainPageMessageView | ||
); | ||
const notificationBoxState = useSelector( | ||
(state: AppState) => state.notificationBox | ||
); | ||
const moreProfileBoxState = useSelector( | ||
(state: AppState) => state.moreProfileBoxReducer | ||
); | ||
if ( | ||
!mainPageMessageOnOffState && | ||
!notificationBoxState.open && | ||
!moreProfileBoxState | ||
) { | ||
return ( | ||
<> | ||
<div className="MainPage_SponsoredBy_Container"> | ||
<h4 className="MainPage_SponsoredBy_Title">Sponsored By</h4> | ||
<div className="MainPage_SponsoredBy_Inner_Container"> | ||
<img | ||
className="MainPage_Sponsored_Image" | ||
src={GoogleImage} | ||
alt="img" | ||
onClick={() => { | ||
window.open("https://www.google.com/", "_blank"); | ||
}} | ||
/> | ||
<div className="MainPage_Sponsored_Name_Container"> | ||
<a | ||
href="https://www.google.com/" | ||
className="MainPage_Sponsored_Name" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
</a> | ||
<p className="MainPage_Sponsored_Info"> | ||
Best Place To Search Anything | ||
</p> | ||
<p className="MainPage_Sponsored_genre">Services</p> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} else if ( | ||
mainPageMessageOnOffState || | ||
notificationBoxState.open || | ||
moreProfileBoxState | ||
) { | ||
return <></>; | ||
} else { | ||
return <></>; | ||
} | ||
}; | ||
|
||
export default SponsoredBy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters