-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(home): style landing page ui and remove scrollbar
- Loading branch information
Showing
8 changed files
with
68 additions
and
147 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
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 |
---|---|---|
@@ -1,7 +0,0 @@ | ||
import React from "react"; | ||
|
||
const MyChats = () => { | ||
return <div style={{ width: "20%" }}>MyChats</div>; | ||
}; | ||
|
||
export default MyChats; | ||
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 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 |
---|---|---|
@@ -1,48 +0,0 @@ | ||
import React, { useContext } from "react"; | ||
import { ChatState } from "@/contexts/ChatProvider"; | ||
import Image from "next/image"; | ||
import { useRouter } from "next/navigation"; | ||
import { VscAccount } from "react-icons/vsc"; | ||
import { DarkLightModeContext } from "@/contexts/DarkLightModeProvider"; | ||
import Theme from "@/styles/Theme.styled"; | ||
|
||
const SideDrawer = () => { | ||
const { user } = ChatState() || { user: null }; | ||
// const [search, setSearch] = useState(""); | ||
// const [searchResults, setSearchResults] = useState([]); | ||
// const [loading, setLoading] = useState(false); | ||
// const [loadingChat, setLoadingChat] = useState(false); | ||
const router = useRouter(); | ||
const { isDark } = useContext(DarkLightModeContext)!; | ||
|
||
const logoutHandler = () => { | ||
localStorage.removeItem("userInfo"); | ||
router.push("/"); | ||
}; | ||
return ( | ||
<> | ||
<nav style={{ display: "flex", justifyContent: "space-between" }}> | ||
<button>Search</button> | ||
<h1>BytePing</h1> | ||
<section> | ||
<button>Notification</button> | ||
<span>{user?.name}</span> | ||
<span> | ||
<Image src={user?.pic || ""} alt="profile picture of user" width={25} height={25} /> | ||
</span> | ||
<div> | ||
<p>My Profile</p> | ||
<p onClick={logoutHandler}>Logout</p> | ||
{user?.pic ? ( | ||
<Image src={user?.pic || ""} alt={user.name} width={24} height={24} style={{ borderRadius: "50%" }} /> | ||
) : ( | ||
<VscAccount size={24} fill={isDark ? Theme.colors.black : Theme.colors.white} /> | ||
)} | ||
</div> | ||
</section> | ||
</nav> | ||
</> | ||
); | ||
}; | ||
|
||
export default SideDrawer; | ||
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 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