()
| 9 | import memories from './images/memories.png'; |
| 10 | |
| 11 | const 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 | |
| 42 | export default App; |
nothing calls this directly
no test coverage detected