mirror of
https://github.com/khairul169/home-lab.git
synced 2025-04-28 16:49:36 +07:00
25 lines
682 B
TypeScript
25 lines
682 B
TypeScript
import React from "react";
|
|
import Box from "@ui/Box";
|
|
import Text from "@ui/Text";
|
|
import dayjs from "dayjs";
|
|
import { InferResponseType } from "hono/client";
|
|
import api from "@/lib/api";
|
|
|
|
type Props = {
|
|
data: InferResponseType<typeof api.system.$get>;
|
|
};
|
|
|
|
const Summary = ({ data }: Props) => {
|
|
return (
|
|
<Box className="px-4 mt-4 py-6 bg-white border border-gray-100 rounded-lg">
|
|
<Text className="text-5xl">{dayjs(data?.date).format("HH:mm")}</Text>
|
|
<Text className="mt-2">
|
|
{dayjs(data?.date).format("dddd, DD MMM YYYY")}
|
|
</Text>
|
|
<Text className="flex-1">{`Uptime: ${data?.uptime || "-"}`}</Text>
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default Summary;
|