-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreference.txt
More file actions
41 lines (33 loc) · 953 Bytes
/
reference.txt
File metadata and controls
41 lines (33 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const types = ["xyz", "abc"]
const[query, setQuery]= usestate({
/*ex only*/ type : "mnskjds",
location : "",
});
/* some function to use on click*/
const switchType = (val) => {
setQuery((prev)=> ({ ...prev, type:val}));
};
{types.map((type)=> (
<button key ={type} onClick= {()=> switchType(type)}>
{type}
</button>
))}
for now the home page i have created is the following.
import React from 'react';
import { userEvents, userGroups } from '../../lib/sampledata';
import './home.scss';
function Home() {
const posts = userEvents;
const groups = userGroups;
return (
<div className='homePage'>
<div className='homeContainer'>
<div className='wrapper'></div>
</div>
<div className='mapContainer'>Map</div>
</div>
);
}
export default Home;
In homepage, the home container should display the following.
*Should display the events posted by user from the dummydata.(with title, description )