feat: update hero

This commit is contained in:
Jesse Egbosionu
2024-07-18 06:58:26 +02:00
parent c17dc18a6c
commit 47d0548098
4 changed files with 43 additions and 31 deletions
+26 -22
View File
@@ -1,6 +1,6 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction // 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"); const { exec } = require("child_process");
@@ -174,21 +174,30 @@ export default async (req, res) => {
`; `;
const remitly_call = new Promise((resolve, reject) => { const remitly_call = new Promise((resolve, reject) => {
exec(remitlyCurlCommand, (error, stdout, stderr) => { fetch("https://api.remitly.io/v2/calculator/estimate?conduit=NLD%3AEUR-NGA%3ANGN&anchor=SEND&amount=100+EUR&purpose=OTHER&strict_promo=false", {
if (error) { "headers": {
reject(`Error: ${error.message}`); "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",
try { "priority": "u=1, i",
const parsed_rate = JSON.parse(stdout); "remitly-deviceenvironmentid": "3RoCMKdq1DauxuTShWkZhQpbQm6AKs0ALkUxILdiIWPuJfxDIokB1w0JII8kqhj1q8ZXWAPFoELwpTlRRKYfiwWoihvXkYcDCYnoACCVAASj",
resolve({ rate: parsed_rate[0].exchange_rate_info.base_rate }); "sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"",
} catch (parseError) { "sec-ch-ua-mobile": "?0",
reject(parseError.message); "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) => { .then((result) => {
console.log("Remitly<<<<<<<", result)
return { return {
rate: parseFloat(result.rate).toFixed(2), rate: parseFloat(result[0].base_rate).toFixed(2),
provider: "Remitly", provider: "Remitly",
bestRate: false, bestRate: false,
href: "https://remit.ly/94fqcne9", href: "https://remit.ly/94fqcne9",
@@ -218,18 +227,13 @@ export default async (req, res) => {
myHeaders.append("sec-fetch-site", "cross-site"); 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"); 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 = { const nalaCall = new Promise((resolve, reject) => {
fetch("https://partners-api.prod.nala-api.com/v1/fx/rates", {
method: "GET", method: "GET",
headers: nalaHeaders, headers: nalaHeaders,
redirect: "follow" redirect: "follow"
}; })
.then((response) => resolve(response.json()))
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))
.catch((error) => reject(error)); .catch((error) => reject(error));
}) })
.then((result) => { .then((result) => {
+6 -6
View File
@@ -32,22 +32,22 @@ export default function Home() {
</a> </a>
</section> </section>
<p className="hero__description"> <p className="hero__description">
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 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 tenets and I continuously adapt these in solving customers problems when I build
software. software.
</p> </p>
<p className="hero__description"> <p className="hero__description">
In the last 4+ years I've been building services and products in the finance, ecommerce In the last 5 years I've been building services and products in the finance, ecommerce
and health space, enriching lifes using technologies like Python(Django, Flask, and logistics domain, enriching lives using technologies like Python(Django,
FastAPI), Javascript(React, Node.js), PostgreSQL, Docker, Redis, Kubernetes etc. FastAPI), Javascript(React, Node.js), PostgreSQL, Docker, Redis, Kubernetes etc.
</p> </p>
<p className="hero__description"> <p className="hero__description">
I'm constantly looking for challenging and impactful opportunities so can always shoot I'm constantly looking for challenging and impactful opportunities so can always shoot
me an{' '} me an{' '}
<a className="text-underline" href="mailto:jesse.egbosionu@gmail.com"> <a className="text-underline email-cta" href="mailto:me@jesseinit.dev">
email email
</a> </a>
. .
@@ -62,8 +62,8 @@ export default function Home() {
</section> </section>
</main> </main>
<footer className="footer"> <footer className="footer">
<p className="text-align-center">Made with ❤️ and Vibes</p> <p className="text-align-center">Made with <span style={{ "color": "red" }}>❤️</span> and Vibes</p>
</footer> </footer>
</div> </div >
); );
} }
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 KiB

After

Width:  |  Height:  |  Size: 136 KiB

+9 -1
View File
@@ -97,7 +97,7 @@ a {
&__description { &__description {
font-size: 1em; font-size: 1em;
margin-bottom: 40px; margin-bottom: 20px;
line-height: 1.5; 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 { .footer {
width: 100%; width: 100%;
position: absolute; position: absolute;