MCPcopy Create free account
hub / github.com/codemistic/Web-Development / App

Function App

project_mern_memories/client/src/App.js:11–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9import memories from './images/memories.png';
10
11const App = () => {
12 const [currentId, setCurrentId] = useState(0);
13 const dispatch = useDispatch();
14 const classes = useStyles();
15
16 useEffect(() => {
17 dispatch(getPosts());
18 }, [currentId, dispatch]);
19
20 return (
21 <Container maxWidth="lg">
22 <AppBar className={classes.appBar} position="static" color="inherit">
23 <Typography className={classes.heading} variant="h2" align="center">Memories</Typography>
24 <img className={classes.image} src={memories} alt="icon" height="60" />
25 </AppBar>
26 <Grow in>
27 <Container>
28 <Grid container justify="space-between" alignItems="stretch" spacing={3}>
29 <Grid item xs={12} sm={7}>
30 <Posts setCurrentId={setCurrentId} />
31 </Grid>
32 <Grid item xs={12} sm={4}>
33 <Form currentId={currentId} setCurrentId={setCurrentId} />
34 </Grid>
35 </Grid>
36 </Container>
37 </Grow>
38 </Container>
39 );
40};
41
42export default App;

Callers

nothing calls this directly

Calls 1

getPostsFunction · 0.90

Tested by

no test coverage detected