-
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.
- Loading branch information
1 parent
9edfca5
commit 8ca04e4
Showing
13 changed files
with
581 additions
and
64 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
Empty file.
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,10 +1,89 @@ | ||
import { Slider } from '@chakra-ui/react' | ||
import React from 'react' | ||
import Navbar from './Navbar' | ||
import Sliders from '../pages/Sliders' | ||
import { useEffect,useState } from 'react' | ||
import axios from 'axios' | ||
import SetSlider from '../pages/SetSlider' | ||
|
||
|
||
|
||
|
||
export default function Home() { | ||
const [data, setData] = useState([]) | ||
const[gridData,setGridData] =useState([]) | ||
const [data1, setData1] = useState([]) | ||
const[tradingData,setTradingData] =useState([]) | ||
const [place,setPlace]=useState([]) | ||
// const [state,dispatch] =useReducer(reducer,initial) | ||
// const [] | ||
|
||
const getData = ({ sort, order }) => { | ||
return axios.get(`http://localhost:3004/data`) | ||
} | ||
|
||
useEffect(() => { | ||
getData({ sort: "price", order: "asc" }).then(res => { | ||
setData(res.data.home1) | ||
setGridData(res.data.home2) | ||
setData1(res.data.packages) | ||
setTradingData(res.data.treading) | ||
setPlace(res.data.placeData) | ||
console.log(res.data) | ||
}) | ||
}, []) | ||
|
||
|
||
return ( | ||
<div> | ||
<Navbar /> | ||
<h1>This is Home</h1> | ||
<Navbar /> | ||
<h1>This is Home</h1> | ||
<div style={{ display: "flex", justifyContent: "space-evenly", margin: "30px 0px 0px 0px" }}> | ||
<img style={{ width: "300px",borderRadius: "20px" }} src='https://cdn1.tripoto.com/media/filter/tst/img/311219/Image/1657192329_aa.png' alt='img' /> | ||
|
||
<img style={{ width: "300px" }} src='https://cdn1.tripoto.com/media/filter/tst/img/311219/Image/1657192307_cc.png' alt='img' /> | ||
|
||
|
||
|
||
<img style={{ width: "300px",borderRadius: "20px" }} src='https://cdn1.tripoto.com/media/filter/tst/img/311219/Image/1657192273_bb.png' alt='Dan Abramov' /> | ||
|
||
|
||
<img style={{ width: "300px",borderRadius: "20px" }} src='https://cdn1.tripoto.com/media/filter/tst/img/311219/Image/1657192344_dd.png' alt="al" /> | ||
|
||
</div> | ||
|
||
<Sliders slide1={4} slide2={4} heading="In the Spotlight: Partnerships" data={data} /> | ||
|
||
<SetSlider /> | ||
|
||
<div style={{display:"grid", | ||
gridTemplateColumns: "repeat(4,1fr)", | ||
gridTemplateRows: "2", | ||
textAlign:"center", | ||
gap: "10px", | ||
margin:"auto 20px", | ||
padding: "10px"}}> | ||
|
||
{gridData.map(el=> | ||
<div key ={el.id} style={{marginBottom: "50px"}}> | ||
<img style={{width:"90%", height: "80%",borderRadius: "20px"}} src={el.image} alt="travel img" /> | ||
<h2 style={{ fontSize: "17px", | ||
textAlign: "left"}}>{el.des}</h2> | ||
<p style={{ fontSize: "17px", | ||
textAlign: "left",color:"blue"}}>By {el.name}</p> | ||
</div> | ||
)} | ||
</div> | ||
|
||
|
||
<img style={{margin:"5%",width:"90%",borderRadius: "20px"}} src="https://cdn1.tripoto.com/media/filter/nxxl/img/2215463/Image/1666956480_rajasthan_1.jpg" alt="" /> | ||
|
||
|
||
<Sliders text="PACKAGE" personText=" / person" setData={setData1} heading="Travel and Learn with Tripoto's Mindful Retreats" data={data1} /> | ||
<Sliders text="PACKAGE" personText=" onward" heading="Book Budget Tour Packages Curated For You" data={tradingData} /> | ||
|
||
<Sliders slide1={4} slide2={4} heading="Plan Your Next Trip Using Tripoto's Complete Destination Guides" data={place} /> | ||
|
||
</div> | ||
) | ||
} |
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,12 +1,13 @@ | ||
import React from 'react' | ||
import Navbar from '../components/Navbar' | ||
import VisitSingapore from './VisitSingapore' | ||
|
||
export default function Beaches() { | ||
return ( | ||
<div> | ||
|
||
<Navbar url="https://static2.tripoto.com/media/filter/nl/img/267346/TripDocument/1486733036_dsc_0153.jpg" /> | ||
<h1>This is Beaches</h1> | ||
<VisitSingapore headingText='Beaches With Tripoto' hide={false} spanText="Beaches With Tripoto"/> | ||
</div> | ||
) | ||
} |
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,11 +1,12 @@ | ||
import React from 'react' | ||
import Navbar from '../components/Navbar' | ||
import VisitSingapore from './VisitSingapore' | ||
|
||
export default function Heritage() { | ||
return ( | ||
<div> | ||
<Navbar url="https://cdn1.tripoto.com/media/filter/tst/img/1429685/Image/1575886238_10_1.jpg" /> | ||
<h1>This is Heritage</h1> | ||
<VisitSingapore headingText='Heritage With Tripoto' hide={false} spanText="Heritage Tripoto" /> | ||
</div> | ||
) | ||
} |
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,12 +1,15 @@ | ||
import React from 'react' | ||
import Navbar from '../components/Navbar' | ||
import VisitSingapore from './VisitSingapore' | ||
|
||
|
||
|
||
export default function Mountains() { | ||
return ( | ||
<div> | ||
<Navbar url="https://cdn1.tripoto.com/media/filter/tst/img/1339961/Image/1633007008_1597325856_img_20180907_173421.jpg" /> | ||
<h1>This is Mountains</h1> | ||
<VisitSingapore headingText='Form With Tripoto' hide={false} spanText="Mountains Tripoto"/> | ||
|
||
</div> | ||
) | ||
} |
Oops, something went wrong.