Skip to content

Commit fd13594

Browse files
rootroot
root
authored and
root
committed
services add
1 parent d303fb7 commit fd13594

File tree

7 files changed

+355
-28
lines changed

7 files changed

+355
-28
lines changed

client/src/components/App.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import Service from "./Service.jsx";
66
import VideoPlayer from "./VideoPlayer.jsx";
77
import API_KEY from "../../../config";
88
import Banner from "./Banner.jsx";
9+
import YogaIcon from "./ExerciseService.jsx";
10+
import ExtraServices from "./ExtraServices.jsx";
911
const navItems = [
1012
{
1113
name: "About",
@@ -66,6 +68,7 @@ class App extends React.Component {
6668
<Banner />
6769
<VideoPlayer submit={this.handleSubmit} videos={videos} />
6870
<Service />
71+
<ExtraServices />
6972
</div>
7073
</div>
7174
);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from "react";
2+
import { GrYoga, GrRun, GrCafeteria } from "react-icons/gr";
3+
4+
class ExerciseService extends React.Component {
5+
constructor(props) {
6+
super(props);
7+
8+
this.state = {};
9+
}
10+
render() {
11+
let iconChoice;
12+
if (this.props.icon === "run") {
13+
iconChoice = <GrRun />;
14+
} else if (this.props.icon === "yoga") {
15+
iconChoice = <GrYoga />;
16+
} else if (this.props.icon === "nutrition") {
17+
iconChoice = <GrCafeteria />;
18+
}
19+
return (
20+
<div className="service-box">
21+
<div>
22+
<h1 className="service-icon">{iconChoice}</h1>
23+
<h4>{this.props.info}</h4>
24+
</div>
25+
</div>
26+
);
27+
}
28+
}
29+
30+
export default ExerciseService;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React, { Component } from "react";
2+
import ExerciseService from "./ExerciseService";
3+
4+
class ExtraServices extends Component {
5+
render() {
6+
return (
7+
<div className="services-container">
8+
<h2 className="services-title">More Services</h2>
9+
<div className="service-boxes">
10+
<ExerciseService info="Running Club" icon="run" />
11+
<ExerciseService info="Yoga Class" icon="yoga" />
12+
<ExerciseService info="Nutrition Workshop" icon="nutrition" />
13+
</div>
14+
</div>
15+
);
16+
}
17+
}
18+
19+
export default ExtraServices;

0 commit comments

Comments
 (0)