Skip to content

Commit

Permalink
updated styles
Browse files Browse the repository at this point in the history
  • Loading branch information
SoumavaBanerjee committed Dec 26, 2020
1 parent 32126ca commit 19efd10
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<!--
Expand Down
9 changes: 9 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
Grid,
Grow,
CssBaseline,
useMediaQuery,
useTheme,
} from "@material-ui/core";

import { useDispatch } from "react-redux";
Expand All @@ -18,6 +20,12 @@ import makeStyles from "./styles";
const App = () => {
const classes = makeStyles();
const dispatch = useDispatch();
const theme = useTheme();
const isbigScreen = useMediaQuery(theme.breakpoints.up("sm"));

const gridProps = {
direction: isbigScreen ? "row" : "column-reverse",
};

useEffect(() => {
dispatch(getPosts());
Expand All @@ -44,6 +52,7 @@ const App = () => {
justify="space-between"
alignItems="stretch"
spacing={3}
{...gridProps}
>
<Grid item xs={12} sm={7}>
<Posts />
Expand Down
23 changes: 18 additions & 5 deletions src/components/Form/Form.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import { Container, TextField } from "@material-ui/core";
import { TextField, Paper, Button, Typography } from "@material-ui/core";
import React from "react";
import makeStyles from "./styles";

const Form = () => {
const classes = makeStyles();
const handleSubmit = () => {};
return (
<Container>
{" "}
<h1>FORM</h1>
</Container>
<Paper className={classes.paper}>
<form
autoComplete="off"
noValidate
className={classes.form}
onSubmit={handleSubmit()}
>
<Typography variant="h6">Memory!</Typography>
<TextField
name="creator"
label="Creator"
variant="outlined"
fullWidth
/>
</form>
</Paper>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Posts/Posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Posts = () => {
const posts = useSelector((state) => state.posts);
const classes = makeStyles();

console.log(posts);
// console.log(posts);

return (
<div>
Expand Down

0 comments on commit 19efd10

Please sign in to comment.