From b311f04513361d90a9eb2fdd569480901f2e2a1b Mon Sep 17 00:00:00 2001 From: Chester Date: Mon, 14 Sep 2020 11:56:26 +0800 Subject: [PATCH 1/2] refactor --- package-lock.json | 32 --------------------- src/pages/home.js | 73 ++++++++++++++++++++++++++--------------------- 2 files changed, 40 insertions(+), 65 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73e49f5..91e35d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6262,11 +6262,6 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" - }, "default-gateway": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", @@ -9675,11 +9670,6 @@ } } }, - "load-script": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/load-script/-/load-script-1.0.0.tgz", - "integrity": "sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ=" - }, "loader-fs-cache": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.3.tgz", @@ -9901,11 +9891,6 @@ "p-is-promise": "^2.0.0" } }, - "memoize-one": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.1.1.tgz", - "integrity": "sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==" - }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -12490,28 +12475,11 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.7.tgz", "integrity": "sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==" }, - "react-fast-compare": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", - "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, - "react-player": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/react-player/-/react-player-2.4.0.tgz", - "integrity": "sha512-INg6BOPV0ry2Q7e43zU0ePrB81K6HKO5wGovGE6yOt9OYGa33ehAb3gDWllC/vUA0R1ggSTtkkTFak6LWUGgNw==", - "requires": { - "deepmerge": "^4.0.0", - "load-script": "^1.0.0", - "memoize-one": "^5.1.1", - "prop-types": "^15.7.2", - "react-fast-compare": "^3.0.1" - } - }, "react-progressive-image": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/react-progressive-image/-/react-progressive-image-0.6.0.tgz", diff --git a/src/pages/home.js b/src/pages/home.js index 8d21e4b..cc8ee48 100644 --- a/src/pages/home.js +++ b/src/pages/home.js @@ -3,40 +3,47 @@ import { Link } from "react-router-dom"; import ProgressiveImage from "react-progressive-image"; const Home = ({ imageDetails, image }) => ( - <> -
-
-
-
-
-
- - - {(src) => Yasmeen Tariq} - - -
+ <> +
+
+
+
+
+
+ + + {(src) => ( + Yasmeen Tariq + )} + + +
+
+
+
Yasmeen Tariq
+
+ 28.538336 + -81.379234 +
+
+
+
-
-
Yasmeen Tariq
-
- 28.538336 - -81.379234 -
-
-
-
-
-
- + + ); export default Home; From 7d88d88a8f5b48eece9d95d40eec7bb4ae98ab81 Mon Sep 17 00:00:00 2001 From: Chester Date: Mon, 14 Sep 2020 11:59:23 +0800 Subject: [PATCH 2/2] refactor --- src/App.js | 46 +++++++-------- src/pages/model.js | 140 ++++++++++++++++++++++++--------------------- 2 files changed, 97 insertions(+), 89 deletions(-) diff --git a/src/App.js b/src/App.js index d8240be..b0ed86e 100644 --- a/src/App.js +++ b/src/App.js @@ -10,32 +10,32 @@ import Header from "./components/header"; import "./App.scss"; function App() { - const imageDetails = { - width: 524, - height: 650, - }; + const imageDetails = { + width: 524, + height: 650, + }; - return ( - -
- ( - + return ( + +
} + render={({ location }) => ( + + } + /> + } + /> + + )} /> - } - /> - - )} - /> - - ); + + ); } export default App; diff --git a/src/pages/model.js b/src/pages/model.js index 365edf7..595e142 100644 --- a/src/pages/model.js +++ b/src/pages/model.js @@ -4,76 +4,84 @@ import ScrollForMore from "../components/scrollForMore"; //Ease const Model = () => { - return ( -
-
-
-
-
-
- 28.538336 - -81.379234 -
-
MUA: @mylifeascrystall
-
-
- - Y - a - s - m - e - e - n - - - T - a - r - i - q - + return ( +
+
+
+
+
+
+ 28.538336 + -81.379234 +
+
MUA: @mylifeascrystall
+
+
+ + Y + a + s + m + e + e + n + + + T + a + r + i + q + +
+
+
+
+
+
+
+
+ an image +
+
+
+
+ +
-
-
-
-
-
-
-
- an image +
+
+
+

+ The insiration behind the artwork &
what it + means. +

+

+ Contrary to popular belief, Lorem Ipsum is not + simply random text. It has roots in a piece of + classical Latin literature from 45 BC, making it + over 2000 years old. Richard McClintock, a Latin + professor at Hampden-Sydney College in Virginia, + looked up one of the more obscure Latin words, + consectetur, from a Lorem Ipsum passage, and going + through the cites of the word in classical + literature, discovered the undoubtable source. Lorem + Ipsum comes from sections 1.10.32 and 1.10.33 of "de + Finibus Bonorum et Malorum" (The Extremes of Good + and Evil) by Cicero, written in 45 BC. This book is + a treatise on the theory of ethics, very popular + during the Renaissance. The first line of Lorem + Ipsum, "Lorem ipsum dolor sit amet..", comes from a + line in section 1.10.32. +

+
-
-
- -
-
-
-
-
-

- The insiration behind the artwork &
what it means. -

-

- Contrary to popular belief, Lorem Ipsum is not simply random text. - It has roots in a piece of classical Latin literature from 45 BC, - making it over 2000 years old. Richard McClintock, a Latin - professor at Hampden-Sydney College in Virginia, looked up one of - the more obscure Latin words, consectetur, from a Lorem Ipsum - passage, and going through the cites of the word in classical - literature, discovered the undoubtable source. Lorem Ipsum comes - from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et - Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 - BC. This book is a treatise on the theory of ethics, very popular - during the Renaissance. The first line of Lorem Ipsum, "Lorem - ipsum dolor sit amet..", comes from a line in section 1.10.32. -

-
-
-
- ); + ); }; export default Model;