Skip to content

Commit

Permalink
google login remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukhdev Bajiya committed Apr 1, 2024
1 parent e8fd14e commit 034d6bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 213 deletions.
1 change: 1 addition & 0 deletions public/googlee8016108fb58f0dc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: googlee8016108fb58f0dc.html
100 changes: 1 addition & 99 deletions src/Pages/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import GoMasaiLogo from "../../assets/images/gomasai.png";
// import GoMasaiLogo from "../../assets/images/gomasaiLogo.png";
import { Link, useNavigate } from 'react-router-dom';
import { useSelector, useDispatch } from "react-redux";
import { setSearchinput, setUserlog } from "../../Redux/action";
import { setSearchinput } from "../../Redux/action";

function Home() {
const { navbar_searchValur } = useSelector((state) => state);
Expand All @@ -19,110 +19,12 @@ function Home() {
navigate("/result")
}

const signIn = () => {
}


const [user, setUser] = React.useState(JSON.parse(localStorage.getItem('userlogindata')) || {
userauth: false,
name: "Guest",
email: "guest@gomasai.com",
photo: "https://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Circle-icons-profile.svg/1024px-Circle-icons-profile.svg.png"
})

// eslint-disable-next-line no-unused-vars
function userDataAddInDatabase(data) {

let userObject = {
userauth: true,
name: data.displayName,
email: data.email,
photo: data.photoURL,
metadata: data.metadata
}

dispatch(setUserlog(data))

localStorage.setItem('userlogindata', JSON.stringify(userObject))
setUser(userObject)
}

return (
<>
<div className='home__navbar'>
<a target="_blank" rel="noreferrer" href="https://mail.google.com/">Gmail</a>
<Link to="/images">Images</Link>
<div className='home__navbarAppPart'>
<svg className="gb_Ve" focusable="false" viewBox="0 0 24 24"><path d="M6,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM16,6c0,1.1 0.9,2 2,2s2,-0.9 2,-2 -0.9,-2 -2,-2 -2,0.9 -2,2zM12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"></path>
</svg>

<div className='home__navbarAppList'>

{user.userauth ?
<Link to={"/account"}>
<img src={user.photo} alt="" />
<p>Account</p>
</Link>
:
<div onClick={signIn}>
<img src={user.photo} alt="" />
<p>Account</p>
</div>
}

<Link to={"/"}>
<img src="https://lh3.googleusercontent.com/WdC-o7ZcZL5WALPSmfUC8H4oYhlhqm1DV45CtHqV06DTRR0rE_P9JXi-J2KXLd9CTyHt_t3ehUm1o_AMltgfAGbvQDku8jsZt0kBSA=h120" alt="" />
<p>Search</p>
</Link>
<Link to={"/maps"}>
<img src="https://lh3.googleusercontent.com/9NuRdiRepVI3n1txfg7Ky2wWzB3DvXkWABXeFMSn2tzDYYkv8T_RMA9R17fWi0ziUDIDTVJx0JruCzOev37c4dkK9Wrgkeyam3pM8lI=h120" alt="" />
<p>Maps</p>
</Link>
<Link to={"/videos"}>
<img src="https://lh3.googleusercontent.com/I95wjYii8vhFSSx-aSYdh2hPAMjgZkA9yjarSQoOd98COwOxkAVn_dulBcTcfbsa7Limy6IKX6G95ep6OB6y2yMLMiX0YEqFx3KQHQ=h120" alt="" />
<p>YouTube</p>
</Link>

<Link to={"/news"}>
<img src="https://lh3.googleusercontent.com/u2XGSr0jis3w5sLeuh8UMqGHgtdqPVPi77xYhPJdMO9C41wYUue3EKPJvwp-ovAlTzt3Ux3R4Mww2HlJ31UKre8vz1Cnno-3MxvWtA=h120" alt="" />
<p>News</p>
</Link>

<Link to={"/translate"}>
<img src="https://lh3.googleusercontent.com/vNgpLTvnDUr6-QM8s4OuuESGDXs_brbGoPR-7vfwdxQI7M4MVFV0CC_Hil4qRDSp4P66ik85fdv09jKn89kDAJVknIbd6wkl0zGQJQ=h120" alt="" />
<p>Translate</p>
</Link>
<Link to={"/books"}>
<img src="https://lh3.googleusercontent.com/nDCFKerWuvJvG26AZOPsWYFPiw3MRFDYqVJcHzQzK6AgY96TXH50bpQ1IE__BdBxxcXm8ZTaQ6OuJ4pbYF1c-ugOTfOmjhffJXEvJQ=h120" alt="" />
<p>Books</p>
</Link>
<Link to={"/shopping"}>
<img src="https://lh3.googleusercontent.com/UqZcYFgfFclRU46MshhuCQD79idBZ8hyIe5WkQ1VLzG47w-Mgu6yGriGkL_YiYF2qau5jrufzTNwFp84tw7Lm-f9t2vQLkrECfur=h120" alt="" />
<p>Shopping</p>
</Link>


</div>
</div>
{
user.userauth ? <div className='home__navbarLoginPart'>
<div className='home__navbarLoginPartImg'>
<img src={user.photo} alt="" />
</div>
<div className='home__navbarLoginPartData'>
<p>Google Account</p>
<p>{user.name}</p>
<p>{user.email}</p>
</div>
</div>
:
<div className='home__navbarLoginPart'>
<div className='home__navbarLoginPartImg'>
<img src={user.photo} alt="" onClick={signIn} />
</div>
<div className='home__navbarLoginPartData'><p>Sign In</p></div>
</div>
}
</div>
<div className="home__gomasaiSection">
<form onSubmit={searchResult}>
Expand Down
112 changes: 0 additions & 112 deletions src/Pages/Home/links.txt

This file was deleted.

4 changes: 2 additions & 2 deletions src/Pages/Videos/Videos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ function Videos() {
<p>{data.snippet.channelTitle}</p>
{/* <p>{data.snippet.publishTime}</p> */}
</div>
<button onClick={() => { return document.getElementById("videos__videoPlay").setAttribute("src", `https://www.youtube.com/embed/${data.id.videoId}`), document.getElementById("videos__videosPlayerPart").style.display = "grid" }}>Play Video</button>
<button onClick={() => { return (document.getElementById("videos__videoPlay").setAttribute("src", `https://www.youtube.com/embed/${data.id.videoId}`), document.getElementById("videos__videosPlayerPart").style.display = "grid") }}>Play Video</button>
</div>
) : <p>Video for "{navbar_searchValur}" not found</p>}
</div>
}

<div className='videos__videosPlayerPart' id='videos__videosPlayerPart'>
<span className='videos__videoscloseRed'>
<img onClick={() => { return document.getElementById("videos__videosPlayerPart").style.display = "none", document.getElementById("videos__videoPlay").removeAttribute("src") }} src="https://img.icons8.com/color/344/close-window.png" alt="" />
<img onClick={() => { return (document.getElementById("videos__videosPlayerPart").style.display = "none", document.getElementById("videos__videoPlay").removeAttribute("src")) }} src="https://img.icons8.com/color/344/close-window.png" alt="" />
</span>
<iframe id="videos__videoPlay" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
</div>
Expand Down

0 comments on commit 034d6bf

Please sign in to comment.