diff --git a/pages/api/v1/rates.js b/pages/api/v1/rates.js index f7ff7c4..7f7c1b7 100644 --- a/pages/api/v1/rates.js +++ b/pages/api/v1/rates.js @@ -1,6 +1,6 @@ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction -import { log } from "console"; +import { error, log } from "console"; const { exec } = require("child_process"); @@ -174,21 +174,30 @@ export default async (req, res) => { `; const remitly_call = new Promise((resolve, reject) => { - exec(remitlyCurlCommand, (error, stdout, stderr) => { - if (error) { - reject(`Error: ${error.message}`); - } - try { - const parsed_rate = JSON.parse(stdout); - resolve({ rate: parsed_rate[0].exchange_rate_info.base_rate }); - } catch (parseError) { - reject(parseError.message); - } - }); + fetch("https://api.remitly.io/v2/calculator/estimate?conduit=NLD%3AEUR-NGA%3ANGN&anchor=SEND&amount=100+EUR&purpose=OTHER&strict_promo=false", { + "headers": { + "accept": "application/json", + "accept-language": "en-GB,en;q=0.9,nl-NL;q=0.8,nl;q=0.7,en-US;q=0.6", + "priority": "u=1, i", + "remitly-deviceenvironmentid": "3RoCMKdq1DauxuTShWkZhQpbQm6AKs0ALkUxILdiIWPuJfxDIokB1w0JII8kqhj1q8ZXWAPFoELwpTlRRKYfiwWoihvXkYcDCYnoACCVAASj", + "sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "\"macOS\"", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site" + }, + "referrerPolicy": "no-referrer", + "body": null, + "method": "GET", + "mode": "cors", + "credentials": "omit" + }).then(result => resolve(result.json())).catch(error => reject(error)); }) .then((result) => { + console.log("Remitly<<<<<<<", result) return { - rate: parseFloat(result.rate).toFixed(2), + rate: parseFloat(result[0].base_rate).toFixed(2), provider: "Remitly", bestRate: false, href: "https://remit.ly/94fqcne9", @@ -218,18 +227,13 @@ export default async (req, res) => { myHeaders.append("sec-fetch-site", "cross-site"); myHeaders.append("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"); - const nalaRequestOptions = { - method: "GET", - headers: nalaHeaders, - redirect: "follow" - }; - - - const nalaCall = new Promise((resolve, reject) => { - fetch("https://partners-api.prod.nala-api.com/v1/fx/rates", nalaRequestOptions) - .then((response) => response.json()) - .then((result) => resolve(result)) + fetch("https://partners-api.prod.nala-api.com/v1/fx/rates", { + method: "GET", + headers: nalaHeaders, + redirect: "follow" + }) + .then((response) => resolve(response.json())) .catch((error) => reject(error)); }) .then((result) => { diff --git a/pages/index.js b/pages/index.js index 961669a..2ddb2c1 100644 --- a/pages/index.js +++ b/pages/index.js @@ -32,22 +32,22 @@ export default function Home() {
- I'm a software engineer based in Amsterdam, Netherlands and curently focused in building and scalling + I'm a software engineer based in Amsterdam, Netherlands and currently focused in building and scaling software backends. Creating impact, team-work and continuous learning are some of my core tenets and I continuously adapt these in solving customers problems when I build software.
- In the last 4+ years I've been building services and products in the finance, ecommerce - and health space, enriching lifes using technologies like Python(Django, Flask, + In the last 5 years I've been building services and products in the finance, ecommerce + and logistics domain, enriching lives using technologies like Python(Django, FastAPI), Javascript(React, Node.js), PostgreSQL, Docker, Redis, Kubernetes etc.
I'm constantly looking for challenging and impactful opportunities so can always shoot me an{' '} - + email . @@ -62,8 +62,8 @@ export default function Home() { - + ); } diff --git a/public/hero.jpg b/public/hero.jpg index 09c30f0..0f76452 100644 Binary files a/public/hero.jpg and b/public/hero.jpg differ diff --git a/styles/globals.scss b/styles/globals.scss index 0d646b2..73a4247 100644 --- a/styles/globals.scss +++ b/styles/globals.scss @@ -97,7 +97,7 @@ a { &__description { font-size: 1em; - margin-bottom: 40px; + margin-bottom: 20px; line-height: 1.5; } @@ -131,6 +131,14 @@ a { } } +.email-cta { + display: inline-block; + background: rgb(0, 119, 255); + padding: 2px 5px; + border-radius: 10%; + color: #fff; +} + .footer { width: 100%; position: absolute;