nrx.sh/src/app/page.tsx

44 lines
1.1 KiB
TypeScript
Raw Normal View History

2025-04-07 17:07:15 +02:00
"use server";
2025-04-02 00:17:25 +02:00
2025-04-07 17:07:15 +02:00
import { getGiteaActivity } from "@/components/gitea";
import { getStravaActivityStats } from "@/components/strava";
2025-04-02 00:17:25 +02:00
import React from "react";
2025-04-07 17:07:15 +02:00
export default async function App() {
const strava = await getStravaActivityStats();
const gitea = await getGiteaActivity();
2025-04-02 00:17:25 +02:00
return (
<>
hi,
<br />
2025-04-03 13:21:58 +02:00
<br /> how nice of you to stop by.
2025-04-02 00:17:25 +02:00
<br />
2025-04-03 13:21:58 +02:00
<br /> this cute little site is my own little playground. my own corner of
the web for me to share and show off.
2025-04-02 00:17:25 +02:00
<br />
2025-04-03 13:21:58 +02:00
<br /> feel free to poke around and see what you find.
2025-04-02 00:17:25 +02:00
<br />
2025-04-03 13:21:58 +02:00
<br /> &mdash; naresh
2025-04-07 17:07:15 +02:00
<br />
{JSON.stringify(gitea)}
<div
style={{
marginTop: "2rem",
borderTopStyle: "dashed",
borderTopWidth: "1px",
}}
>
<div style={{ fontSize: "0.8rem" }}>
recent rides: {strava.rides.toFixed(1)} km
{strava.runs >= 5 && (
<>
<br />
recent runs: {strava.runs.toFixed(1)} km
</>
)}
</div>
</div>
2025-04-02 00:17:25 +02:00
</>
);
}