Skip to content

Commit dbd31ee

Browse files
committed
Added Desktop as a separate component
1 parent 3d4781a commit dbd31ee

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

src/HomePage.js

Lines changed: 0 additions & 14 deletions
This file was deleted.
File renamed without changes.

src/components/Desktop/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
import desktop from './desktop.svg';
3+
import './styles.css';
4+
5+
export const Desktop = () => {
6+
return (
7+
<div className="Home">
8+
<header className="Home-Page">
9+
<h2>Stratafly</h2>
10+
<h5>Find The Best Flight Deals With Us</h5>
11+
<img src={desktop} alt="stratafly" />
12+
</header>
13+
</div>
14+
);
15+
};

src/App.css renamed to src/components/Desktop/styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.App {
1+
.Home {
22
text-align: center;
33
}
44

5-
.App-header {
5+
.Home-Page {
66
background-color: #e7f6e7;
77
min-height: 100vh;
88
display: flex;

src/containers/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { trip } from '../shared/app-constants';
1414
import { PaymentContainer } from './PaymentContainer';
1515
import { Empty } from '../components/Empty';
1616
import { Confirmation } from '../components/Confirmation';
17+
import {Desktop} from "../components/Desktop";
1718

1819
const appScreens = {
1920
showSearch: false,
@@ -70,6 +71,7 @@ class App extends Component {
7071
onBookAnotherFlight = () => this.setState(defaultState);
7172

7273
render() {
74+
if (window.screen.width >= 1024 && window.screen.height >= 768) return <Desktop />;
7375
const {
7476
from,
7577
to,

0 commit comments

Comments
 (0)