Skip to content

Commit

Permalink
Merge pull request #24 from jib2004/dev
Browse files Browse the repository at this point in the history
Debugging
  • Loading branch information
jib2004 authored Oct 9, 2024
2 parents 5106ca2 + 4ea3b13 commit c45d938
Show file tree
Hide file tree
Showing 13 changed files with 480 additions and 2,312 deletions.
3 changes: 1 addition & 2 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

}

}




2,011 changes: 352 additions & 1,659 deletions package-lock.json

Large diffs are not rendered by default.

45 changes: 1 addition & 44 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,50 +131,7 @@ function App() {

</Router>

{/* Main Application Routes */}
<Routes>
<Route
path="/dashboard"
element={
<MainLayout>
<Dashboard />
</MainLayout>
}
/>
<Route
path="/manage-properties"
element={
<MainLayout>
<ManageProperties />
</MainLayout>
}
/>
<Route
path="/manage-properties/add-property"
element={
<MainLayout>
<AddProperties />
</MainLayout>
}
/>
<Route
path="/manage-properties/add-property/preview"
element={
<MainLayout>
<Preview />
</MainLayout>
}
/>
<Route
path="/messages"
element={
<MainLayout>
<Messages />
</MainLayout>
}
/>
</Routes>
</Router>

</>
);

Expand Down
28 changes: 2 additions & 26 deletions src/components/generalComponents/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { useContext } from "react";
import hamburger_menu from "../../assets/hamburger.png";
import user from "../../assets/icons/Frame 1000010090.png";
import notificationIcon from "../../assets/icons/Group 1000002800.png";
import downArrow from "../../assets/icons/Profile arrow.png";
import DisplayContext from "../../context/DispalyContext";



import notificationIcon from '../../assets/images/Group 1000002800.png'
Expand Down Expand Up @@ -40,26 +35,7 @@ const Navbar = ({pagetitle}) => {
},[show])


return (
<nav className=' w-full bg-[#FCFDFD] pt-[16px] pb-[8px] px-2 xl:px-[40px] gap-0 md:gap-3 xl:gap-0 flex justify-between items-center'>
<div>
<h1 className='md:text-[20px] xl:text-[28px] leading-[36px] tracking-[-1px] font-semibold text-[#242828]'>{pagetitle}</h1>
</div>

<div>
<input type="search" name="" id="" placeholder='Search Property' value={show} onChange={handleSearch} className='bg-[#F5F6F6] md:w-[461px] py-[2px] px-[8px] md:h-[48px]'/>
</div>

<div className='hidden xl:block'>
<ul className='flex items-center gap-3'>
<li><img src={notificationIcon} alt="" /></li>
<li className='flex items-center gap-2'>
<img src={user} alt="" className='size-[48px] rounded-full object-contain'/>
<div className='flex items-center'><span>DreamHomes</span> <img src={downArrow} alt="" /></div>

</li>
</ul>
</div>



return (
Expand Down
13 changes: 1 addition & 12 deletions src/components/generalComponents/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,7 @@ try {
<img src={logo} alt="logo" />
</div>

<div className=' w-full '>
<ul className='w-full '>
<li className={`${pathname.includes('/dashboard') && 'border-l-[4px] border-white bg-[#389294]'}`}><Link className='pl-5 flex items-center gap-3 py-[12px] text-[20px] leading-[28px] tracking-[-0.75px]' to={'/dashboard'}><img src={dasboardIcon} alt="" /><span>Dashboard</span></Link></li>
<li className={`${pathname.includes('/manage-properties') && 'border-l-[4px] border-white bg-[#389294]'}`}><Link to={'/manage-properties'} className='pl-5 flex items-center gap-3 py-[12px] text-[20px] leading-[28px] tracking-[-0.75px]'><img src={manangeIcon} alt="" /><span>Manage Properties</span></Link></li>
<li className={`${pathname.includes('/transactions') && 'border-l-[4px] border-white bg-[#389294]'}`}><Link to="/transactions" className='pl-5 flex items-center gap-3 py-[12px] text-[20px] leading-[28px] tracking-[-0.75px]'><img src={transactionsIcon} alt="" /><span>Transactions</span></Link></li>



<li className={`${pathname.includes('/inquiries') && 'border-l-[4px] border-white bg-[#389294]'}`}><Link to={'/inquiries'} className='pl-5 flex items-center gap-3 py-[12px] text-[20px] leading-[28px] tracking-[-0.75px]'><img src={inquiriesIcon} alt="" /><span>Inquiries</span></Link></li>
<li className={`${pathname.includes('/messages') && 'border-l-[4px] border-white bg-[#389294]'}`}><Link className='pl-5 flex items-center gap-3 py-[12px] text-[20px] leading-[28px] tracking-[-0.75px]' to={'/messages'}><img src={messagesIcon} alt="" /><span>Messages</span></Link></li>
</ul>
</div>


<div className="w-full">
<ul className="w-full">
Expand Down
12 changes: 10 additions & 2 deletions src/pages/Buyers/BuyersNavbar.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react'

import logo from '../../assets/logos/Left Nav.svg'
import { useLocation,useNavigate } from 'react-router-dom'

const user = localStorage.getItem("userData")

const BuyersNavbar = () => {
const {pathname} = useLocation()
const navigate = useNavigate()
Expand All @@ -16,15 +18,21 @@ const BuyersNavbar = () => {
<li className='text-[16px] leading-6 tracking-[-0.5px] text-[#3F86FA]'>Contact Us</li>
</ul>


{user ?
<div>
<button className='w-[127px] h-[48px] rounded-lg px-[20px] py-[12px] bg-[#3F86FA] text-white font-medium text-[16px] leading-6 tracking-[-0.5px]' >Dashboard</button>
</div>
:
<div className='flex gap-4'>

<div>
<button className='w-[127px] h-[48px] rounded-lg px-[20px] py-[12px] text-[#3F86FA] border border-[#3F86FA] font-medium text-[16px] leading-6 tracking-[-0.5px]' onClick={()=>navigate('/buyer-signin')}>Sign In</button>
</div>
<div>
<button className='w-[127px] h-[48px] rounded-lg px-[20px] py-[12px] bg-[#3F86FA] text-white font-medium text-[16px] leading-6 tracking-[-0.5px]' onClick={()=>navigate('/buyer-signup')}>Sign Up</button>
</div>
</div>
}
</nav>
)
}
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Buyers/PropertyDescription.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PropertyDescription = () => {

const handlePurchase = async () =>{
try {
const res = await Instance2.post('/purchase',{
await Instance2.post('/purchase',{
propertyId:productId,
userId:1,
paymentMethod:'Transfer',
Expand All @@ -38,6 +38,7 @@ const PropertyDescription = () => {
const res = await Instance2.get(`/properties/${id}`)
const similar = await Instance2.get(`/properties/search?city=${res.data.data.city}`)
setProperty(res.data.data)
console.log(res.data.data)
setSimilarity(similar.data.data)
setAmount(res.data.data.price)
setProductId(res.data.data.id)
Expand All @@ -47,7 +48,7 @@ const PropertyDescription = () => {
}
}
getProperty()
},[id])
},[id,amount])

return (
<div className=''>
Expand Down
Loading

0 comments on commit c45d938

Please sign in to comment.