From d0a4f2b5d4ce006d31b9bc090bf927d1b3715243 Mon Sep 17 00:00:00 2001 From: sonirudrakshi99 Date: Tue, 6 Dec 2022 18:12:35 +0530 Subject: [PATCH] refactor(body): created separate body comps --- src/components/CardBar/CardBar.js | 64 ++++++++++++++++ src/components/HelpCard/HelpCard.js | 55 ++++++++++++++ src/components/body/body.js | 114 +--------------------------- 3 files changed, 122 insertions(+), 111 deletions(-) create mode 100644 src/components/CardBar/CardBar.js create mode 100644 src/components/HelpCard/HelpCard.js diff --git a/src/components/CardBar/CardBar.js b/src/components/CardBar/CardBar.js new file mode 100644 index 0000000..eb30da6 --- /dev/null +++ b/src/components/CardBar/CardBar.js @@ -0,0 +1,64 @@ +import { Component } from "react"; +import Image from "../img/voice-message.png"; +import SMS from "../img/sms.png"; +import Help from "../img/help-desk.png"; + +class CardBar extends Component { + render() { + return ( +
+
+

+ HOW KRASHAK HELPS +

+

+ Being a part of Krashak.AI, these are our mainstays +

+
+
+
+
+
+ help +

+ 24*7 calls and help desk +

+

+ Providing solutions through calls +

+
+
+
+
+ SMS +

+ SMS services for contact +

+

+ Send your queries through SMS +

+
+
+
+
+ voice assistance +

+ Voice assistant System +

+

+ Get voice assisted solution +

+
+
+
+
+
+ ); + } +} + +export default CardBar; diff --git a/src/components/HelpCard/HelpCard.js b/src/components/HelpCard/HelpCard.js new file mode 100644 index 0000000..8446a13 --- /dev/null +++ b/src/components/HelpCard/HelpCard.js @@ -0,0 +1,55 @@ +import { Component } from "react"; +import SMS from "../img/sms.png"; +import Help from "../img/help-desk.png"; +import Call from "../img/phone-call.png"; + +class HelpCard extends Component { + render() { + return ( +
+
+

+ NEED HELP? +

+

+ We open the door to thousands of farmers worldwide. Ask your queries + and get the best solution instantly. There are two ways to get the + solutions. +

+
+
+
+
+ +
+

Give krashak a call

+

9876644566

+
+
+
+ +
+

Drop your query to

+

9876644566

+
+
+
+ +
+

Use the voice bot

+

this.navigation.navigate("/voice")} + > + click here +

+
+
+
+
+
+ ); + } + } + + export default HelpCard; \ No newline at end of file diff --git a/src/components/body/body.js b/src/components/body/body.js index a4175d2..98d467a 100644 --- a/src/components/body/body.js +++ b/src/components/body/body.js @@ -1,118 +1,10 @@ -import { useNavigate } from "react-router-dom"; import "../../index.css"; -import { Component } from "react"; import "./body.css"; -import Image from "../img/voice-message.png"; -import SMS from "../img/sms.png"; -import Help from "../img/help-desk.png"; -import Call from "../img/phone-call.png"; import FeatureImg from "../img/feature.jpeg"; - -class CardBar extends Component { - render() { - return ( -
-
-

- HOW KRASHAK HELPS -

-

- Being a part of Krashak.AI, these are our mainstays -

-
-
-
-
-
- -

- 24*7 calls and help desk -

-

- Providing solutions through calls -

-
-
-
-
- -

- SMS services for contact -

-

- Send your queries through SMS -

-
-
-
-
- -

- Voice assistent System -

-

- Get voice assisted solution -

-
-
-
-
-
- ); - } -} - -class HelpCard extends Component { - render() { - return ( -
-
-

- NEED HELP? -

-

- We open the door to thousands of farmers worldwide. Ask your queries - and get the best solution instantly. There are two ways to get the - solutions. -

-
-
-
-
- -
-

Give krashak a call

-

9876644566

-
-
-
- -
-

Drop your query to

-

9876644566

-
-
-
- -
-

Use the voice bot

-

this.navigation.navigate("/voice")} - > - click here -

-
-
-
-
-
- ); - } -} +import CardBar from "../CardBar/CardBar"; +import HelpCard from "../HelpCard/HelpCard"; const Body = () => { - const navigate = useNavigate(); return (
@@ -140,7 +32,7 @@ const Body = () => { Take a look at our features

- + features
);