import variables from "@/variables/variables";
import NavBar from "@/components/NavBar";
import { Container, Text , Heading, Flex, Card, Box, Strong, Tooltip, Button} from "@radix-ui/themes";
import timeStampToDate from "@/functions/timeStampToDate";
import Link from "next/link";
export default async function Home() {
function truncateText(text) {
const maxLength = 48;
if (text.length > maxLength) {
return text.slice(0, maxLength) + "...";
}
return text;
}
try {
const url = variables.BACKEND_URL+"/api/v1/read/latest-shares"
const request = await fetch(url, {
method: 'GET',
next: {
revalidate: 0,
}
})
const response = await request.json();
const shares = response.data;
return (
<>