Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Improve Mobile Responsiveness of Navbar and Tab Sections, and Comment Out History and Win/Loss Sections #2 #8

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bet_app/src/components/DetailsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ const DetailsCard = ({
<div className="flex my-2">
<span className="flex flex-col mx-3 text-black">
<span className="text-lg font-semibold">Bet Initiator</span>
<span className="text-lg font-light">{sender}</span>
<span className="text-lg font-light capitalize">{sender}</span>
</span>
<span className="flex flex-col mx-3 text-black">
<span className="text-lg font-semibold">Response</span>
<span className="text-lg font-light">{senderResp}</span>
<span className="text-lg font-light capitalize">{senderResp}</span>
</span>
</div>
<div className="flex my-2">
<span className="flex flex-col mx-3 text-black">
<span className="text-lg font-semibold">Bet Receiver</span>
<span className="text-lg font-light">{receiver}</span>
<span className="text-lg font-light capitalize">{receiver}</span>
</span>
<span className="flex flex-col mx-3 text-black">
<span className="text-lg font-semibold">Response</span>
<span className="text-lg font-light">{receiverResp}</span>
<span className="text-lg font-light capitalize">{receiverResp}</span>
</span>
</div>

Expand Down
6 changes: 4 additions & 2 deletions bet_app/src/components/List.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const List = ({ BetList, setBetList }) => {


return (
<div className="w-[96%] pb-4 h-full flex flex-col scroller">
<div className="w-full flex flex-wrap p-12 mt-2 box-content gap-x-6">
{BetList?.map((bet, index) => {
const {
senderName,
Expand Down Expand Up @@ -56,7 +56,8 @@ const List = ({ BetList, setBetList }) => {
}

return (
<DetailsCard
<div key={index} className="lg:w-[30%] md:w-[45%] w-full flex box-content ">
<DetailsCard
key={index}
betid={bet._id}
sender={senderName}
Expand All @@ -80,6 +81,7 @@ const List = ({ BetList, setBetList }) => {
sendResponse={SendRespone}
setBetList={setBetList}
/>
</div>
);
})}
</div>
Expand Down
18 changes: 9 additions & 9 deletions bet_app/src/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,40 @@ const Nav = ({ username }) => {
navigate("/createBet");
};
return (
<div className=" w-full py-4 text-black flex flex-col px-3">
<div className="flex w-full justify-between items-center">
<span className="flex flex-col items-start">
<div className=" w-full py-4 text-black flex flex-col px-3 gap-2">
<div className="flex w-full justify-between items-center gap-2">
<span className="flex flex-col items-start">
<button
className=" font-bold mr-2 "
className="font-bold text-sm md:text-base mr-2 "
onClick={() => {
navigate("/home");
}}
>
Home
</button>
<span className=" text-md font-bold">
<span className=" text-sm md:text-base font-bold capitalize">
Welcome,{username}
</span>
</span>

<span>
<div className="flex flex-wrap justify-end items-end gap-2">
<button
className="bg-purple-800 text-white text-sm px-1 py-1 font-bold rounded-md mx-2"
className="bg-purple-800 text-white text-sm md:text-base px-1 py-1 font-bold rounded-md"
onClick={() => {
CreateBet();
}}
>
Create Bet
</button>
<button
className="bg-red-600 text-white text-sm px-1 py-1 font-bold rounded-md"
className="bg-red-600 text-white text-sm md:text-base px-1 py-1 font-bold rounded-md"
onClick={() => {
logout();
}}
>
Logout
</button>
</span>
</div>
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions bet_app/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Home = () => {
return (
<div className="w-screen h-screen flex bg-blue-100 flex-col">
<Nav username={username} />
<div className="py-3 flex w-full justify-around my-2 text-black mt-2 border-solid border-b-2 border-slate-600">
<div className="py-3 flex gap-2 flex-wrap md:flex-row w-full justify-around my-2 text-black mt-2 border-solid border-b-2 border-slate-600">
<span className="font-semibold cursor-pointer relative liner">
<NavLink
className="nav_link"
Expand Down Expand Up @@ -91,7 +91,7 @@ const Home = () => {
</NavLink>
</span>
</div>
<div className="w-full h-full overflow-y-scroll scroller scroll-smooth flex justify-center items-center">
<div className="w-full h-full overflow-y-scroll scroller scroll-smooth flex-wrap flex justify-center items-center">
<List BetList={BetList} setBetList={setBetList} />
</div>
</div>
Expand Down