-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add detail page and edit main page.
- Loading branch information
Showing
5 changed files
with
147 additions
and
115 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 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import axios from "axios"; | ||
import { useEffect, useState } from "react"; | ||
|
||
function FilterMenuLeft(props) { | ||
const [ minprice, setMinprice ] = useState(0); | ||
const [ maxprice, setMaxprice ] = useState(0); | ||
const geter = () => { | ||
console.log(props); | ||
props.getting(minprice, maxprice); | ||
} | ||
console.log(props.getting(minprice, maxprice)); | ||
return ( | ||
<ul className="list-group list-group-flush rounded"> | ||
<li className="list-group-item"> | ||
<h5 className="mt-1 mb-2">Price Range</h5> | ||
<div className="d-grid d-block mb-3"> | ||
<div className="form-floating mb-2"> | ||
<input | ||
type="number" | ||
className="form-control min-price" | ||
placeholder="Min" | ||
defaultValue={ minprice } | ||
onChange= {(event)=> setMinprice(event.target.valueAsNumber)} | ||
/> | ||
<label htmlFor="floatingInput">Min Price</label> | ||
</div> | ||
<div className="form-floating mb-2"> | ||
<input | ||
type="number" | ||
className="form-control max-price" | ||
placeholder="Max" | ||
defaultValue= { maxprice } | ||
onChange = {(event)=> setMaxprice(event.target.valueAsNumber)} | ||
/> | ||
<label htmlFor="floatingInput">Max Price</label> | ||
</div> | ||
<button className="btn btn-dark apply" onClick={ geter }>Apply</button> | ||
</div> | ||
</li> | ||
</ul> | ||
); | ||
} | ||
|
||
export default FilterMenuLeft; |
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