import React from "react";
import Grid from "@material-ui/core/Grid";
import Paper from "@material-ui/core/Paper";
import Typography from "@material-ui/core/Typography";
const styles = {
Paper: { padding: 50, marginTop: 30, marginBottom: 10 }
};
export default ({ exercises }) => (
<Grid container spacing={1}>
<Grid item>
<Paper styles={styles.Paper}>
{exercises.map(([group, exercises]) => (
<Typography variant="subtitle1">{group}</Typography>
))}
</Paper>
</Grid>
<Grid item>
<Paper styles={styles.Paper} />
</Grid>
</Grid>
);
Я не понимаю, почему появляется эта ошибка, я следовал этому уроку шаг за шагом https://www.youtube.com/watch?v=fox4Y-_Q9hE&list=RDCMUCUDLFXXKG6zSA1d746rbzLQ&start_radio=1&t=848, и его код не получает эту ошибку. ПОЖАЛУЙСТА, ПОМОГИТЕ МНЕ, stakoverflow продолжает говорить мне, что мой пост в основном код, и я не знаю, что добавить больше, чем этот LOL.
export const muscles = ["shoulders", "chest", "arms", "back", "legs"];
export const exercises = [
{
id: "overhead-press",
title: "Overhead Press",
description: "Delts exercise...",
muscles: "shoulders"
},
{
id: "dips",
title: "Dips",
description: "Triceps exercise...",
muscles: "arms"
},
{
id: "barbell-curls",
title: "Barbell Curls",
description: "Biceps exercise...",
muscles: "arms"
},
{
id: "bench-press",
title: "Bench Press",
description: "Chest exercise...",
muscles: "chest"
},
{
id: "pull-ups",
title: "Pull Ups",
description: "Back and biceps exercise...",
muscles: "back"
},
{
id: "deadlifts",
title: "Deadlifts",
description: "Back and leg exercise...",
muscles: "back"
},
{
id: "squats",
title: "Squats",
description: "Legs exercise...",
muscles: "legs"
}
];