Skip to content
Open
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
16 changes: 2 additions & 14 deletions zostel/src/App.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
import logo from './logo.svg';
import './App.css';
import ExpDestination from './Components/destinations/ExpDestinations';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<ExpDestination />
</div>
);
}
Expand Down
Empty file.
42 changes: 42 additions & 0 deletions zostel/src/Components/destinations/ExpDestinations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Explore Destinations
import data from "../../demo.json";
import { useState } from "react";
// now i'm working



function ExpDestination(){

let [item, setItem] = useState("")

console.log(data.Destinations);
return (
<>
<h1>Explore Destinations</h1>
<div className="des" style={{display: "flex", flexWrap:"wrap", justifyContent:"center", alignItems:"center"}}>

{
data.Destinations.map((e) => {
return (
<div style={{
backgroundImage: `url(${e.img})`,
width: "300px",
height: "300px",
margin: "8px",
display: "flex",
padding: "10px",
backgroundSize: "cover",
borderRadius: "10px"
}}>
{e.name}
</div>
// <img src={e.img}></img>
)
})
}
</div>
</>
)

}
export default ExpDestination;
1 change: 0 additions & 1 deletion zostel/src/Components/destinations/ExpDestinations.jsx

This file was deleted.

Loading