Ejected Create react app jest coverage report not accurate - reactjs

I create an app using create-react-app and after that I ejected it. Currently doing my test suite, I want to show my test coverage so I added "collectCoverage" : true under my package.json. After I run my test it doesnt show the percentage of my test coverage
Is there anything I need to do?
Here is the Links.test.jsx
import React from "react";
import { shallow, mount } from "enzyme";
import Links from "./Links";
it("should show correct links", () => {
const wrapper = mount(<Links />);
expect(wrapper).toMatchSnapshot();
});
Below is the Links component that was being tested
import React from "react";
const Links = () => {
return (
<div className="container mb-4 mt-4" id="Links">
<div className="h4 mb-3">OUR LINKS</div>
<div className="d-flex justify-content-between flex-wrap mw-90">
<a
href="https://site.ca/sites.aspx"
target="_blank"
className="buttonImage siteImage"
>
<div className="darkenBackground d-flex flex-column justify-content-center">
<div className="text-center h4">My Site</div>
</div>
</a>
<a href="#" target="_blank" className="buttonImage mapsImage">
<div className="darkenBackground d-flex flex-column justify-content-center">
<div className="text-center h4">Maps</div>
</div>
</a>
<a href="#" target="_blank" className="buttonImage loopImage">
<div className="darkenBackground d-flex flex-column justify-content-center">
<div className="text-center h4">Social</div>
</div>
</a>
<a href="#" target="_blank" className="buttonImage polcyImage">
<div className="darkenBackground d-flex flex-column justify-content-center">
<div className="text-center h4">
Acceptable Use <br /> and Security Policies
</div>
</div>
</a>
</div>
</div>
);
};
export default Links;

Related

How can I fix the collapse navbar using reactjs

I'm creating a static website using reactjs so I downloaded a template and I divide it on components using reactjs but the responsive collapse navdar doesn't work anymore and I'm trying to fix it so I tried many solutions but I got nothing.
There are no errors but the code still doesn't work.
can you help me please!
this is the navbar component.
import React, {useState,useEffect} from 'react';
import '../assets/css/style.css';
import '../assets/css/slick.css';
import '../assets/css/magnific-popup.css';
import '../assets/css/animate.css';
import '../assets/css/bootstrap.min.css';
import '../assets/css/home7fonts.css';
import Logo from '../assets/images/logos/logo-black.png'
function Header()
{
const [toggleMenu, setToggleMenu] = useState(false)
const [screenWidth, setScreenWidth] = useState(window.innerWidth)
const toggleNav = () => {
setToggleMenu(!toggleMenu)
}
useEffect(() => {
const changeWidth = () => {
setScreenWidth(window.innerWidth);
}
window.addEventListener('resize', changeWidth)
return () => {
window.removeEventListener('resize', changeWidth)
}
}, [])
return (
<header className="main-header header-seven">
<div className="header-upper">
<div className="container-fluid clearfix">
<div className="header-inner d-flex align-items-center">
<div className="logo-outer">
<div className="logo"><img src={Logo} alt="Logo" title="Logo"></img></div>
</div>
<div className="nav-outer clearfix d-flex align-items-center">
<nav className="main-menu navbar-expand-lg">
<div className="navbar-header">
<div className="mobile-logo py-15">
<a href="index.html">
<img src={Logo} alt="Logo" title="Logo"></img>
</a>
</div>
<button onClick={toggleNav} type="button" className="navbar-toggle" data-toggle="collapse"
data-target=".navbar-collapse">
<span className="icon-bar"></span>
<span className="icon-bar"></span>
<span className="icon-bar"></span>
</button>
</div>
<div className="navbar-collapse collapse clearfix">
{(toggleMenu || screenWidth > 500) && (
<ul className="navigation onepage clearfix">
<li>Home</li>
<li>about</li>
<li>services</li>
<li>FAQs</li>
<li>pricing</li>
<li>testimonial</li>
<li>blog</li>
</ul>
)}
</div>
</nav>
<div className="header-number">
<i className="fas fa-phone-alt"></i>
<div className="number-content">
<span>Tell Us</span>
+12 ) 235 - 586 - 56
</div>
</div>
<div className="menu-btn">
<a href="#" className="theme-btn style-eight">Start Free Tral
<i className="fas fa-long-arrow-alt-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</header>
);
}
export default Header;
Go to https://getbootstrap.com/docs/5.1/components/navbar/ and Copy one collapse navbar you like. Past the code in your function components and change class to className, etc.
open your public folder at root directory. Find index.html. Add bootstrap Css between <head>.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
Add Bootstrap JS after <div id="root">,
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
then, reload your react project. See it work.

How do you swap a component with another after onclick event?

Below, I have a code that is eventually rendered as a route in a react, single page, app. What I was hoping to get, was that depending on what div was clicked, each applying a 'filter', that the component variable, will change components, based off what was imported.
import React from "react";
import { useState } from 'react';
import UpperLevel from "./UpperLevel";
import Grid from "./Grid";
import GridCardio from "./GridCardio";
import GridHome from "./GridHome";
import GridGym from "./GridGym";
import GridUpper from "./GridUpper";
import GridLower from "./GridLower";
const marginAuto = {
margin: "auto"
};
const cursorPointer = {
cursor: "pointer"
};
function ExercisesLauncher() {
const component=<Grid/>;
function applyCardio() {
const component=<GridCardio/>
}
function applyGym() {
alert( "GymClicked" );
}
function applyHome() {
alert( "HomeClicked" );
}
function applyUpper() {
alert( "UpperClicked" );
}
function applyLower() {
alert( "LowerClicked" );
}
return (<main>
<section class="colored-section" id="title">
<div class="container-fluid">
<div class="row">
<div class="container-fluid main-text">
<h1 class="big-heading">Exercises</h1>
<p>
Below, feel free to navigate to whatever execrises you may find useful for your next workout. Either learn more about the exercise, or add it to your catelog to later add to your scheduler.
</p>
</div>
</div>
<h2 class="normal-heading mb-4">Group</h2>
<div class="container-fluid row row-cols-1 row-cols-md-3 mb-3 text-center" style={marginAuto}>
<div id="Gym" onClick={applyGym} class="col-lg-6 d-flex align-items-stretch">
<div style={cursorPointer} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-heading py-1">
<h1 class="normal-heading">Gym</h1>
</div>
<div class="card-body">
<p>You have equipment that is found at an ordinary gym.</p>
</div>
</div>
</div>
<div id="Home" onClick={applyHome} class="col-lg-6 d-flex align-items-stretch">
<div style={cursorPointer} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-heading py-1">
<h1 class="normal-heading">At Home</h1>
</div>
<div class="card-body">
<p>
Small, mobile, or convenient equipment that still has use.
</p>
</div>
</div>
</div>
</div>
<h2 class="normal-heading mb-4">Equipment</h2>
<div class="container-fluid row row-cols-1 row-cols-md-3 mb-3 text-center" style={marginAuto}>
<div id="Upper" onClick={applyUpper} class="col-lg-4 d-flex align-items-stretch">
<div style={cursorPointer} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-body">
<h1 class="normal-heading">Upper Body</h1>
<p>
Includes the chest, arms, shoulders, and anything else above the waist.
</p>
</div>
</div>
</div>
<div id="Lower" onClick={applyLower} class="col-lg-4 d-flex align-items-stretch">
<div style={cursorPointer} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-body">
<h1 class="normal-heading">Lower Body</h1>
<p>
Includes the quadriceps, hamstrings, glutes, and anything else below the waist.
</p>
</div>
</div>
</div>
<div id="Cardio" onClick={applyCardio} class="col-lg-4 d-flex align-items-stretch">
<div style={cursorPointer} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-body">
<h1 class="normal-heading">Cardio</h1>
<p>
Any exercise that benefits the cardio-system that gets the heart pumpin.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="album py-5 black-section">
<div id="root" class="container">
//THIS WILL CHANGE BASED ON CLICKS
{component};
</div>
</div>
</section>
<footer id="footer">
<div class="container-fluid">
<a href="index.html">
{" "}
<img class="logo mb-3" src="https://raw.githubusercontent.com/fabianenavarro/Get-a-Grip/main/public/images/fist.png" alt=""/>
</a>
<p>2022 Getta Grip! LLC</p>
</div>
</footer>
</main>);
}
export default ExercisesLauncher;
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
So far, I added alerts to make sure the server recognized these div elements being clicked, now, I just wish to apply the respective component to the body after a div is clicked. The main grid component does load where {component} is, which is perfect, I just do not know why the GridCardio component is not switching out the Grid component
Rather than loading Grid into a component, that is loaded into another component, I used in my App2 to load the page(compiled everything pertaining to this page) and came up with this script, which was a lot easier than I thought it would be. I learned that I had to rerender my components! This does exactly what I needed! I had a lot of unnecessary components and this was the best approach in my opinion. I am also trying to get my mind used to using arrow notation, so do not mind the "function's
import React, { useState } from 'react';
import {render} from 'react-dom';
import NavBar from "./components/NavBar";
import Grid from "./components/Exercises/Grid";
import GridCardio from "./components/Exercises/GridCardio";
import GridHome from "./components/Exercises/GridHome";
import GridGym from "./components/Exercises/GridGym";
import GridUpper from "./components/Exercises/GridUpper";
import GridLower from "./components/Exercises/GridLower";
const marginAuto = {
margin: "auto"
};
const cursorPointer = {
cursor: "pointer"
};
//THIS IS ALL RESPONSIBLE FOR LOADING EVERYTHING IN ONE PAGE DONT WORRY ABOUT IT
function App2() {
// const [display, setState] = React.useState(<Grid/>);
let component = <Grid/>;
const [gridState, changePlease] = useState(component);
function applyHome(){
changePlease(<GridHome/>);
}
function applyCardio(){
changePlease(<GridCardio/>);
}
function applyLower(){
changePlease(<GridLower/>);
}
function applyUpper(){
changePlease(<GridUpper/>);
}
function applyHome(){
changePlease(<GridHome/>);
}
function applyGym(){
changePlease(<GridGym/>);
}
return (<section>
<NavBar/>
<main>
<section class="colored-section" id="title">
<div class="container-fluid">
<div class="row">
<div class="container-fluid main-text">
<h1 class="big-heading">Exercises</h1>
<p>
Below, feel free to navigate to whatever execrises you may find useful for your next workout. Either learn more about the exercise, or add it to your catelog to later add to your scheduler.
</p>
</div>
</div>
<h2 class="normal-heading mb-4">Group</h2>
<div class="container-fluid row row-cols-1 row-cols-md-3 mb-3 text-center" style={marginAuto}>
<div id="Gym" class="col-lg-6 d-flex align-items-stretch">
<div style={cursorPointer} onClick={applyGym} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-heading py-1">
<h1 class="normal-heading">Gym</h1>
</div>
<div class="card-body">
<p>You have equipment that is found at an ordinary gym.</p>
</div>
</div>
</div>
<div id="Home" class="col-lg-6 d-flex align-items-stretch">
<div style={cursorPointer} onClick={applyHome} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-heading py-1">
<h1 class="normal-heading">At Home</h1>
</div>
<div class="card-body">
<p>
Small, mobile, or convenient equipment that still has use.
</p>
</div>
</div>
</div>
</div>
<h2 class="normal-heading mb-4">Equipment</h2>
<div class="container-fluid row row-cols-1 row-cols-md-3 mb-3 text-center" style={marginAuto}>
<div id="Upper" class="col-lg-4 d-flex align-items-stretch">
<div style={cursorPointer} onClick={applyUpper} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-body">
<h1 class="normal-heading">Upper Body</h1>
<p>
Includes the chest, arms, shoulders, and anything else above the waist.
</p>
</div>
</div>
</div>
<div id="Lower" class="col-lg-4 d-flex align-items-stretch">
<div style={cursorPointer} onClick={applyLower} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-body">
<h1 class="normal-heading">Lower Body</h1>
<p>
Includes the quadriceps, hamstrings, glutes, and anything else below the waist.
</p>
</div>
</div>
</div>
<div id="Cardio" onClick={applyCardio} class="col-lg-4 d-flex align-items-stretch">
<div style={cursorPointer} class="card w-100 mb-4 rounded-3 shadow-sm filter">
<div class="card-body">
<h1 class="normal-heading">Cardio</h1>
<p>
Any exercise that benefits the cardio-system that gets the heart pumpin.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="album py-5 black-section">
<div id="root" class="container">
{/* THIS WILL CHANGE BASED ON CLICKS */}
{gridState}
</div>
</div>
</section>
<footer id="footer">
<div class="container-fluid">
<a href="index.html">
{" "}
<img class="logo mb-3" src="https://raw.githubusercontent.com/fabianenavarro/Get-a-Grip/main/public/images/fist.png" alt=""/>
</a>
<p>2022 Getta Grip! LLC</p>
</div>
</footer>
</main>);
</section>);
}
export default App2;
You're tripping up on the way you're using your component variable. You don't want to re-declare the variable, you just want to assign a new value
function ExercisesLauncher() {
var component=<Grid/>;
function applyCardio() {
component=<GridCardio/>;
}
...

Unable to use div components with bootstrap classes inside map function in react

I have passed the data via props, the console logs show me the data being passed. here is the code below
import React, { Component } from 'react';
import "../../../node_modules/bootstrap/dist/css/bootstrap.min.css";
import "./TestimonialCard.css";
const Cards = ({cardData}) =>{
console.log(cardData);
return(
<>
<div className="container">
<div className="row">
<div className="col-md-8 col-center m-auto">
<h2>Testimonials</h2>
<div id="myCarousel" className="carousel slide" data-ride="carousel" >
<div className="carousel-inner">
{cardData.map((slide , index )=>{
{console.log(slide)}
<div className="item carousel-item active" key={index} >
<div className="img-box">
<img src={slide.image} alt={slide.alt}/>
</div>
<p className="testimonial">
{slide.testimonial}
</p>
<p className="overview">
<b> {slide.name} </b> ,<span>{slide.designation}</span>
</p>
</div>
})}
</div>
<a className="carousel-control left carousel-control-prev" href="myCarousel" data-slide="prev">
<i className="fa fa-angle-left"></i>
</a>
<a className="carousel-control right carousel-control-next" href="myCarousel" data-slide="next">
<i className="fa fa-angle-right"></i>
</a>
</div>
</div>
</div>
</div>
</>
)
}
export default Cards
Here, I'm not getting an expected UI under my div with carousel-inner class.
You can use it like this:
import React, { Component } from 'react';
import "../../../node_modules/bootstrap/dist/css/bootstrap.min.css";
import "./TestimonialCard.css";
const Cards = ({cardData}) =>{
console.log(cardData);
const cardData = (cardData) => {
cardData.map((slide, index) => {
return (
<div className="item carousel-item active" key={index}>
<div className="img-box">
<img src={slide.image} alt={slide.alt}/>
</div>
<p className="testimonial">
{slide.testimonial}
</p>
<p className="overview">
<b> {slide.name} </b> ,<span>{slide.designation}</span>
</p>
</div>
)
})
}
return(
<>
<div className="container">
<div className="row">
<div className="col-md-8 col-center m-auto">
<h2>Testimonials</h2>
<div id="myCarousel" className="carousel slide" data-ride="carousel" >
<div className="carousel-inner">
{cardData()}
</div>
<a className="carousel-control left carousel-control-prev" href="myCarousel" data-slide="prev">
<i className="fa fa-angle-left"></i>
</a>
<a className="carousel-control right carousel-control-next" href="myCarousel" data-slide="next">
<i className="fa fa-angle-right"></i>
</a>
</div>
</div>
</div>
</div>
</>
)
}
export default Cards
The reason UI was not rendering is because you are using {} instead of () in map inside JSX.
If you want to use map inside render() or the JSX you need to use () instead of {} like this:
{cardData.map((slide , index )=> (
{console.log(slide)}
<div className="item carousel-item active" key={index} >
<div className="img-box">
<img src={slide.image} alt={slide.alt}/>
</div>
<p className="testimonial">
{slide.testimonial}
</p>
<p className="overview">
<b> {slide.name} </b> ,<span>{slide.designation}</span>
</p>
</div>
))}

Loop Over Entire Div in React TypeScript

I want to display a bootstrap card multiple times dynamically in React using TypeScript. What I did was in the functional component I Wrapped the Return in a For Loop but that ain't working. If I'm doing it wrong, can you suggest other ways to loop over an entire functional component in react to show it multiple times?
Error in Index.tsx :
'Body' cannot be used as a JSX component.
Its return type 'Element | undefined' is not a valid JSX element.
Type 'undefined' is not assignable to type 'Element | null'
Body.tsx
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.css';
function Body() {
var arr=["one", "two", "three", "four"];
for (let index = 0; index < arr.length; index++) {
return (
<div className="container-fluid col-7 ">
<br/>
<div className="card shadow p-3 mb-5 bg-white rounded">
<div className="card-body">
<div className="row mb-1">
<div className=" text-styles">Q</div>
<div className="col-11 text-styles pr-n15">Why is good UI design so hard for some Developers? How to Improve this some content?</div>
</div>
<br/>
<div className="row mt-n4">
<div className="col-12">
<p><span className="text-style-grey ml-3">#Finance | Lodging & Food Services | may 15, 5.56 PM</span></p>
<ol className="steps">
<li className="step1 current"><span>Submitted</span></li>
<li className="step2"><span>.</span></li>
<li className="step3"><span>.</span></li>
<li className="step4"><span>.</span></li>
<li className="step4"><span>.</span></li>
</ol>
</div>
<hr/>
</div>
<div className="row mb-n4">
<div className="col-11"></div>
<div className="col-1"><i className="fa fa-ellipsis-h"></i></div>
</div>
</div>
</div>
</div>
);
}
}
export default Body;
Index.tsx
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import Body from './Body';
import Header from './Header';
import * as serviceWorker from './serviceWorker';
import 'bootstrap/dist/css/bootstrap.css';
import Sidebars from './Sidebars';
ReactDOM.render(
<React.StrictMode>
<Header />
<Body />
{/* <Sidebars /> */}
</React.StrictMode>,
document.getElementById('root')
);
serviceWorker.unregister();
Use map function instead of for loop
return (
<> {["one", "two", "three", "four"].map((item,i)=>
<div className="container-fluid col-7" key={i}>
{item}
<br/>
<div className="card shadow p-3 mb-5 bg-white rounded">
<div className="card-body">
<div className="row mb-1">
<div className=" text-styles">Q</div>
<div className="col-11 text-styles pr-n15">
Why is good UI design so hard for some Developers?
How to Improve this some content?</div>
</div>
<br/>
<div className="row mt-n4">
<div className="col-12">
<p><span className="text-style-grey ml-3">
#Finance | Lodging & Food Services |
may 15, 5.56 PM</span></p>
<ol className="steps">
<li className="step1 current"><span>Submitted</span></li>
<li className="step2"><span>.</span></li>
<li className="step3"><span>.</span></li>
<li className="step4"><span>.</span></li>
<li className="step4"><span>.</span></li>
</ol>
</div>
<hr/>
</div>
<div className="row mb-n4">
<div className="col-11"></div>
<div className="col-1"><i className="fa fa-ellipsis-h"></i></div>
</div>
</div>
</div>
</div>
)}
</>
);
I created an array in which I pushed the HTML code n Number of times and then displayed the row in the return function
Body.tsx
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.css';
function Body() {
var rows = [];
for (var i = 0; i < 3; i++) {
rows.push(<div className="container-fluid col-7 mt-2 ">
<div className="card shadow p-3 mb-5 bg-white rounded">
<div className="card-body">
<div className="row mb-1">
<div className=" text-styles">Q</div>
<div className="col-11 text-styles pr-n15">Why is good UI design so hard for some Developers? How to Improve this some content?</div>
</div>
<br/>
<div className="row mt-n4">
<div className="col-12">
<p><span className="text-style-grey ml-3">#Finance | Lodging & Food Services | may 15, 5.56 PM</span></p>
<ol className="steps">
<li className="step1 current"><span>Submitted</span></li>
<li className="step2"><span>.</span></li>
<li className="step3"><span>.</span></li>
<li className="step4"><span>.</span></li>
<li className="step4"><span>.</span></li>
</ol>
</div>
<hr/>
</div>
<div className="row mb-n4">
<div className="col-11"></div>
<div className="col-1"><i className="fa fa-ellipsis-h"></i></div>
</div>
</div>
</div>
</div> );
}
return (
<div>{rows}</div>
);
}
export default Body;

Sections not displaying on React App or showing content that is supposed to be there

Hello I am making a React App and am not getting my content displaying within certain sections for localhost:3000. I believe it has to do with folders like CSS/JSS/Images being in the Public folder and not rendering properly to the SRC folder.
Even possibly when parts of code are within a . But I am struggling to find the reason for this.
My classes were all changed to 'className', but still same issue
import React from 'react';
import './App.css';
class App extends React.Component {
render() {
return (
<div className="App">
<body data-spy="scroll" data-target=".site-navbar-target" data-offset="300">
<nav className="navbar navbar-expand-lg navbar-dark ftco_navbar bg-dark ftco-navbar-light site-navbar-target" id="ftco-navbar">
<div className="container">
<a className="navbar-brand" href="index.html">Digi<span>Lab</span></a>
<button className="navbar-toggler js-fh5co-nav-toggle fh5co-nav-toggle" type="button" data-toggle="collapse" data-target="#ftco-nav" aria-controls="ftco-nav" aria-expanded="false" aria-label="Toggle navigation">
<span className="oi oi-menu"></span> Menu
</button>
<div className="collapse navbar-collapse" id="ftco-nav">
<ul className="navbar-nav nav ml-auto">
<li className="nav-item"><span>Home</span></li>
<li className="nav-item"><span>Services</span></li>
<li className="nav-item"><span>Projects</span></li>
<li className="nav-item"><span>About</span></li>
<li className="nav-item"><span>Testimony</span></li>
<li className="nav-item"><span>Blog</span></li>
<li className="nav-item"><span>Contact</span></li>
</ul>
</div>
</div>
</nav>
<section id="home-section" className="hero">
<h3 className="vr">Welcome to DigiLab</h3>
<div className="home-slider js-fullheight owl-carousel">
<div className="slider-item js-fullheight">
<div className="overlay"></div>
<div className="container-fluid p-0">
<div className="row d-md-flex no-gutters slider-text js-fullheight align-items-center justify-content-end" data-scrollax-parent="true">
<div className="one-third order-md-last img js-fullheight" containerStyle="background-image:url(./bg_1.jpg);">
<div className="overlay"></div>
</div>
<div className="one-forth d-flex js-fullheight align-items-center ftco-animate" data-scrollax=" properties: { translateY: '70%' }">
<div className="text">
<span className="subheading">Welcome to the digilab</span>
<h1 className="mb-4 mt-3">Small Details Make A Big <span>Impression</span></h1>
<p>A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country.</p>
<p>Get in touch</p>
</div>
</div>
</div>
</div>
</div>
<div className="slider-item js-fullheight">
<div className="overlay"></div>
<div className="container-fluid p-0">
<div className="row d-flex no-gutters slider-text js-fullheight align-items-center justify-content-end" data-scrollax-parent="true">
<div className="one-third order-md-last img js-fullheight" containerStyle="background-image:url(images/bg_2.jpg);">
<div className="overlay"></div>
</div>
<div className="one-forth d-flex js-fullheight align-items-center ftco-animate" data-scrollax=" properties: { translateY: '70%' }">
<div className="text">
<span className="subheading">Welcome to the digilab</span>
<h1 className="mb-4 mt-3"><span>Strategic</span> Design And <span>Technology</span> Agency</h1>
<p>A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country.</p>
<p>Get in touch</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
)
}
}
This is what I am aiming to achieve:
enter image description here
And this is what I am getting in return:
enter image description here

Resources