From e8110053b8485c2128aa157317ffffd495a53be2 Mon Sep 17 00:00:00 2001 From: rezcode Date: Fri, 19 Aug 2022 22:09:17 +0800 Subject: [PATCH 01/34] revert main --- components/organisms/formFlight.js | 326 +++++++++++++---------------- pages/register.js | 8 +- 2 files changed, 157 insertions(+), 177 deletions(-) diff --git a/components/organisms/formFlight.js b/components/organisms/formFlight.js index 104c81b..c963cab 100644 --- a/components/organisms/formFlight.js +++ b/components/organisms/formFlight.js @@ -1,193 +1,169 @@ /* eslint-disable jsx-a11y/alt-text */ /* eslint-disable react-hooks/rules-of-hooks */ /* eslint-disable @next/next/no-img-element */ -import React, { useState } from 'react'; -import Image from 'next/image'; -import { useRouter } from 'next/router'; - -import back from '../../public/icons/btnback.svg'; -import arrow from '../../public/icons/arrow.svg'; -import go from '../../public/icons/white-arrow.svg'; -import full from '../../public/icons/fullScreen.svg'; -import Default from '../../public/img/bali.png'; -import style from './style/flight.module.css'; +import React, { useState } from "react"; +import Image from "next/image"; +import { useRouter } from "next/router"; +// import Zoom from 'next-image-zoom'; +import back from "../../public/icons/btnback.svg"; +import arrow from "../../public/icons/arrow.svg"; +import go from "../../public/icons/white-arrow.svg"; +import full from "../../public/icons/fullScreen.svg"; +import Default from "../../public/img/bali.png"; +import style from "./style/flight.module.css"; const formFlight = () => { - const router = useRouter(); - /* const [deptCity, setDeptCity] = useState(''); + const router = useRouter(); + /* const [deptCity, setDeptCity] = useState(''); const [arrCity, setArrCity] = useState(''); */ - return ( -
-
+ return ( +
+
+
+
-
-
- destinasi -
-
- Back -
-
- full -
-
-
-

Destinations

-
-
-
-
-
-
-
From
- -

- Indonesia -

-
- arrow { + destinasi +
+
+ Back +
+
+ full +
+
+
+

Destinations

+
+
+
+
+
+
+
From
+ +

Indonesia

+
+ arrow { setDeptCity(arrCity); setArrCity(deptCity); }} */ - /> -
-
To
+ /> +
+
To
- -

Japan

-
-
-
-
    -
    -
    -
  • - - -
  • -
    -
    -
  • - - -
  • -
    -
    -
-
-
-
Departure
-
- -
-
-
-
How many person?
-
- - -
+ +

Japan

+
+
+
+
    +
    +
    +
  • + + +
  • -
    -
    - Which class do you want? -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    +
    +
  • + + +
  • - -
    +
    +
+
+
+
Departure
+
+ +
+
+
+
How many person?
+
+ + +
+
+
+
Which class do you want?
+
+
+ + +
+
+ + +
+
+ + +
+
-
+ +
+
- ); +
+ ); }; export default formFlight; diff --git a/pages/register.js b/pages/register.js index fefa780..007172d 100644 --- a/pages/register.js +++ b/pages/register.js @@ -38,8 +38,12 @@ const Register = () => { - - + + Date: Fri, 19 Aug 2022 21:34:54 +0700 Subject: [PATCH 02/34] [revert] --- components/organisms/formDetailFlight.js | 2 +- components/organisms/formFlight.js | 2 +- components/organisms/formResult.js | 333 ++++++++++++----------- styles/BookingDetail.module.css | 30 ++ styles/Home.module.css | 130 +++++++++ styles/MyBooking.module.css | 26 ++ styles/Profile.module.css | 41 +++ 7 files changed, 405 insertions(+), 159 deletions(-) create mode 100644 styles/BookingDetail.module.css create mode 100644 styles/Home.module.css create mode 100644 styles/MyBooking.module.css create mode 100644 styles/Profile.module.css diff --git a/components/organisms/formDetailFlight.js b/components/organisms/formDetailFlight.js index e25a939..54d99d7 100644 --- a/components/organisms/formDetailFlight.js +++ b/components/organisms/formDetailFlight.js @@ -6,7 +6,7 @@ import Image from 'next/image'; import { useRouter } from 'next/router'; import { Navigation } from 'swiper'; import { Swiper, SwiperSlide } from 'swiper/react'; -import Default from '../../public/img/garuda.svg'; +import Default from '../../public/images/garuda.svg'; import flight from '../../public/icons/flight.svg'; import back from '../../public/icons/btnback.svg'; diff --git a/components/organisms/formFlight.js b/components/organisms/formFlight.js index f742fe8..19d061f 100644 --- a/components/organisms/formFlight.js +++ b/components/organisms/formFlight.js @@ -9,7 +9,7 @@ import back from '../../public/icons/btnback.svg'; import arrow from '../../public/icons/arrow.svg'; import go from '../../public/icons/white-arrow.svg'; import full from '../../public/icons/fullScreen.svg'; -import Default from '../../public/img/bali.png'; +import Default from '../../public/images/bali.png'; import style from './style/flight.module.css'; const formFlight = () => { diff --git a/components/organisms/formResult.js b/components/organisms/formResult.js index 69031df..54dcbfb 100644 --- a/components/organisms/formResult.js +++ b/components/organisms/formResult.js @@ -1,79 +1,86 @@ /* eslint-disable @next/next/no-img-element */ /* eslint-disable jsx-a11y/alt-text */ -import React from "react"; -import Image from "next/image"; -import moment from "moment"; +import React from 'react'; +import Image from 'next/image'; +import moment from 'moment'; -import airAsia from "../../public/img/airAsia.svg"; -import Default from "../../public/img/garuda.svg"; -import flight from "../../public/icons/flight.svg"; -import arrow from "../../public/icons/arrow2.png"; -import filter from "../../public/icons/filter.svg"; -import back from "../../public/icons/btnback.svg"; +import airAsia from '../../public/images/airAsia.svg'; +import Default from '../../public/images/garuda.svg'; +import flight from '../../public/icons/flight.svg'; +import arrow from '../../public/icons/arrow2.png'; +import filter from '../../public/icons/filter.svg'; +import back from '../../public/icons/btnback.svg'; -import style from "./style/result.module.css"; +import style from './style/result.module.css'; const SearchResult = () => { - return ( -
-
-
-
-
-
- Back -
-
- -
-
-
-
-

From

-

To

-
-
-
- -
Indonesia
-
-
- -
-
- -
Japan
-
-
-
-
-
-
-
- Passenger -
2 Child 4 Adult
-
-
- Class -
Economy
-
-
-
-
-
-
-
2 flight found
-
Filter
- - {/* +
+
+
+
+
+ Back +
+
+ +
+
+
+
+

From

+

To

+
+
+
+ +
Indonesia
+
+
+ +
+
+ +
Japan
+
+
+
+
+
+
+
+ Passenger +
2 Child 4 Adult
+
+
+ Class +
Economy
+
+
+
+
+
+
+
+ 2 flight found +
+
Filter
+ + {/* { @@ -87,94 +94,106 @@ const SearchResult = () => { setMode('ASC'); }} > */} -
-
-
-
- -
-
-
-
-
-

IDN

-
12.33
-
-
-
- -
-
-
-

JPN

-
15.21
-
-
-
-
3 hours 11 minutes
-
-
-
- $ 145,00 -
-
-
-
-
-
+
+
+
+
+ +
+
+
+
+
+

+ IDN +

+
12.33
+
+
+
+ +
+
+
+

+ JPN +

+
15.21
+
+
+
+
+ 3 hours 11 minutes +
+
+
+
+ $ 145,00 +
+
+
+
+
+
-
-
-
- -
-
-
-
-
-

IDN

-
12.33
-
-
-
- -
-
-
-

JPN

-
15.21
-
-
-
-
3 hours 11 minutes
-
-
-
- $ 145,00 -
-
-
-
-
-
-
-
-
-
-
- ); +
+
+
+ +
+
+
+
+
+

+ IDN +

+
12.33
+
+
+
+ +
+
+
+

+ JPN +

+
15.21
+
+
+
+
+ 3 hours 11 minutes +
+
+
+
+ $ 145,00 +
+
+
+
+
+
+
+
+
+
+
+ ); }; export default SearchResult; diff --git a/styles/BookingDetail.module.css b/styles/BookingDetail.module.css new file mode 100644 index 0000000..fa71b3d --- /dev/null +++ b/styles/BookingDetail.module.css @@ -0,0 +1,30 @@ +.bodyWrapper { + background-color: #2495ff; + min-height: 110vh; +} + +.header { + color: #ffffff; + font-weight: bolder; + font-size: 20px; +} + +.flight span { + font-size: 26px; + font-weight: bold; +} + +.ticketInfo p { + margin-bottom: 5px; + color: #a5a5a5; + font-weight: lighter; +} + +.ticketInfo h5 { + color: #595959; + font-size: 16px; +} + +.qrCodeTicket img { + width: 200px; +} \ No newline at end of file diff --git a/styles/Home.module.css b/styles/Home.module.css new file mode 100644 index 0000000..cab137b --- /dev/null +++ b/styles/Home.module.css @@ -0,0 +1,130 @@ +.bodyWrapper { + height: 100vh; +} + +.exploreWrapper { + background-color: #fbfbfb; +} + +.fixHeight { + height: 100vh; +} + +/* Header */ +.notification div { + gap: 5px; + display: inline; +} + +.notification svg { + cursor: pointer; +} + +.message { + margin-right: 20px; +} + +/* Header End */ + +/* Trending Destinations */ +.trendingTitle { + font-weight: bold; +} + +.viewAll { + color: #2395ff; +} + +.destinationsCarousel { + position: relative; + overflow: hidden; + border-radius: 15px !important; + cursor: pointer; + min-height: 190px; + width: 90% !important; +} + +.destinationsCarousel::after { + content: ""; + position: absolute; + z-index: 3; + height: 100%; + width: 100%; + background: linear-gradient(180deg, transparent 0, transparent 10%, #000); + opacity: 0.8; +} + +.destinationsImage { + object-fit: cover !important; +} + +.totalAirlines { + position: absolute; + top: 8px; + left: 16px; + font-size: small; + background-color: #ffffff; + opacity: 0.5; + padding: 5px; + border-radius: 15px; +} + +.destinationTitle { + position: absolute; + bottom: 8px; + left: 16px; + color: white; + font-weight: bold; + font-size: larger; + z-index: 5; +} + +.destinationCity { + font-size: small; + font-weight: lighter; +} + +.totalAirlines span { + color: rgb(176, 172, 172); +} + +/* Trending Destinations End */ + +/* top 10 Destinations */ +.cardDestinations img { + border-radius: 50%; + object-fit: cover; + padding: 3px !important; + border: 3px solid #2495ff !important; +} + +/* Footer */ +.footer { + position: sticky; + left: 0; + bottom: 0; + height: 70px; + background-color: white; + margin-left: 0px; + padding-top: 8px; + padding-bottom: 8px; + margin-right: 0px; +} + +.footer svg { + cursor: pointer; +} + +.footer small { + font-size: small; + color: #979797; +} + +.goFlight svg { + border-radius: 50%; + background-color: #2395ff; + box-shadow: 0px 5px 15px rgba(35, 149, 255, 0.49); + border: 12px solid #2395ff; +} + +/* Footer End */ \ No newline at end of file diff --git a/styles/MyBooking.module.css b/styles/MyBooking.module.css new file mode 100644 index 0000000..18995d5 --- /dev/null +++ b/styles/MyBooking.module.css @@ -0,0 +1,26 @@ +.bodyWrapper { + height: 100vh; +} + +.myBookingWrapper { + background-color: #fbfbfb; +} + +.fixHeight { + height: 110vh; +} + +.countryCode h3 { + display: inline; +} + +.countryCode svg { + margin-left: 15px; + margin-right: 15px; + margin-bottom: 10px; +} + +.status { + font-weight: bolder; + color: #7a7a7a; +} \ No newline at end of file diff --git a/styles/Profile.module.css b/styles/Profile.module.css new file mode 100644 index 0000000..0c5ae25 --- /dev/null +++ b/styles/Profile.module.css @@ -0,0 +1,41 @@ +.bodyWrapper { + height: 100vh; +} + +.profileWrapper { + background-color: #fbfbfb; +} + +.fixHeight { + height: 110vh; +} + +.titleProfile { + font-size: 36px; + font-weight: bold; +} + +.titleEdit { + color: #2395ff; +} + +.profileImage img { + border-radius: 50%; + object-fit: cover; + padding: 8px !important; + border: 3px solid #2495ff !important; +} + +.profileImage p { + color: #6b6b6b; + font-size: small; +} + +.profileMenu span { + font-size: 17px; + font-weight: bolder; +} + +.logout { + color: #f24545; +} \ No newline at end of file From edb96d10d50966654defb796ae64751848ea9409 Mon Sep 17 00:00:00 2001 From: rezcode Date: Fri, 19 Aug 2022 22:45:04 +0800 Subject: [PATCH 03/34] back up data --- pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.js b/pages/index.js index f132bd1..2bb86cf 100644 --- a/pages/index.js +++ b/pages/index.js @@ -26,7 +26,7 @@ const Explore = () => { className="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-lg" - placeholder="Where you want to go?" + placeholder="Where you want to go ?" />
From 8ba9ee1ffd3324bcc2ebe674e0ef4aea1eb134b2 Mon Sep 17 00:00:00 2001 From: rezcode Date: Sat, 20 Aug 2022 01:41:58 +0800 Subject: [PATCH 04/34] get trending destination home page --- components/organisms/trendingDestinations.js | 68 +++------ next.config.js | 7 +- package-lock.json | 140 +++++++++++++++++++ package.json | 1 + pages/index.js | 27 +++- 5 files changed, 191 insertions(+), 52 deletions(-) diff --git a/components/organisms/trendingDestinations.js b/components/organisms/trendingDestinations.js index 29a883a..d1d7c1a 100644 --- a/components/organisms/trendingDestinations.js +++ b/components/organisms/trendingDestinations.js @@ -6,7 +6,7 @@ import Slider from "react-slick"; import Image from "next/image"; import exampleImgDestination from "../../public/images/example-destination.png"; -const TrendingDestinations = () => { +const TrendingDestinations = (props) => { const settings = { dots: false, infinite: false, @@ -50,6 +50,8 @@ const TrendingDestinations = () => { ], }; + console.log(props?.data); + return ( <>
@@ -62,51 +64,25 @@ const TrendingDestinations = () => {
-
- -
- 15 Airlines -
-
- Tokyo, -
- Japan -
-
-
- -
- 15 Airlines -
-
- Tokyo, -
- Japan -
-
-
- -
- 15 Airlines -
-
- Tokyo, -
- Japan -
-
+ {props?.data?.map((item, index) => { + return ( +
+ +
+ {item.count} Airlines +
+
+ {item.city}, +
+ {item.country} +
+
+ ); + })}
diff --git a/next.config.js b/next.config.js index ae88795..077f494 100644 --- a/next.config.js +++ b/next.config.js @@ -2,6 +2,9 @@ const nextConfig = { reactStrictMode: true, swcMinify: true, -} + images: { + domains: ["res.cloudinary.com"], + }, +}; -module.exports = nextConfig +module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 2bff777..3a6c246 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@fontsource/lato": "^4.5.9", "@fontsource/poppins": "^4.5.9", + "axios": "^0.27.2", "bootstrap": "^5.2.0", "moment": "^2.29.4", "next": "12.2.5", @@ -709,6 +710,11 @@ "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", "dev": true }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/axe-core": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz", @@ -718,6 +724,15 @@ "node": ">=4" } }, + "node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -862,6 +877,17 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -951,6 +977,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -1653,6 +1687,38 @@ "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2325,6 +2391,25 @@ "node": ">=8.6" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4026,12 +4111,26 @@ "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "axe-core": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz", "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==", "dev": true }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -4133,6 +4232,14 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4197,6 +4304,11 @@ "object-keys": "^1.1.1" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -4751,6 +4863,21 @@ "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, + "follow-redirects": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5240,6 +5367,19 @@ "picomatch": "^2.3.1" } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", diff --git a/package.json b/package.json index 113635a..0d3959a 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@fontsource/lato": "^4.5.9", "@fontsource/poppins": "^4.5.9", + "axios": "^0.27.2", "bootstrap": "^5.2.0", "moment": "^2.29.4", "next": "12.2.5", diff --git a/pages/index.js b/pages/index.js index 2bb86cf..a50771f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import style from "../styles/Home.module.css"; import { FiSearch } from "react-icons/fi"; import "slick-carousel/slick/slick.css"; @@ -8,7 +8,10 @@ import Header from "../components/organisms/header"; import TrendingDestinations from "../components/organisms/trendingDestinations"; import TopTenDestinations from "../components/organisms/topTenDestinations"; -const Explore = () => { +const Explore = (props) => { + const [trendingDest] = useState(props?.trendingDest?.data); + const [topTenDest] = useState(props?.topTenDest?.data); + return ( <>
@@ -31,9 +34,9 @@ const Explore = () => {
- +
- +