-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f6847e
commit d12a6d6
Showing
18 changed files
with
532 additions
and
684 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,49 @@ | ||
import React, { useState } from 'react'; | ||
import './BestPlacesSection.css'; | ||
|
||
const BestGroceries = () => { | ||
const cities = [ | ||
"Order grocery in Bangalore", | ||
"Order grocery in Gurgaon", | ||
"Order grocery in Hyderabad", | ||
"Order grocery in Delhi", | ||
" Order grocery in Mumbai", | ||
"Order grocery in Pune", | ||
" Order grocery in Kolkata", | ||
" Order grocery in Chennai", | ||
" Order grocery in Ahmedabad", | ||
"Order groceryin Chandigarh", | ||
" Order grocery in Jaipur", | ||
" Order grocery in Kochi", | ||
" Order grocery in Coimbatore", | ||
"Order grocery in Lucknow", | ||
" Order grocery in Nagpur", | ||
"Order groceryin Vadodara", | ||
"Order grocery in Indore", | ||
"Order grocery in Vizag", | ||
" Order grocery in Surat", | ||
" Order grocery in Dehradun", | ||
"Order grocery in Noida", | ||
"Order grocery in Vijayawada" | ||
]; | ||
|
||
const [visibleCount, setVisibleCount] = useState(9); | ||
|
||
const handleShow_more = () => { | ||
setVisibleCount((prevCount) => prevCount + 4); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<h2>Cities with groceries delivery</h2> | ||
<div className='button-grid'> | ||
{cities.slice(0, visibleCount).map((item, index) => | ||
<button key={index} className='city-button'>{item}</button> | ||
)} | ||
<button onClick={handleShow_more}>Show more</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BestGroceries; |
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
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
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
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
Oops, something went wrong.