fix: remove unused import and clean up file size formatting logic

This commit is contained in:
ZareMate 2025-05-12 07:51:14 +02:00
parent 6115851147
commit 24d90a9412
Signed by: zaremate
GPG Key ID: 369A0E45E03A81C3

View File

@ -6,7 +6,6 @@ import {
FileActionsContainer, FileActionsContainer,
FileDescriptionContainer, FileDescriptionContainer,
} from "~/app/_components/ActionButtons"; // Import the client component } from "~/app/_components/ActionButtons"; // Import the client component
import Head from "next/head";
import type { Metadata } from "next"; import type { Metadata } from "next";
interface FileDetails { interface FileDetails {
@ -135,10 +134,10 @@ export default async function FilePreviewContainer({
{fileDetails.size > 1024 * 1024 * 1024 {fileDetails.size > 1024 * 1024 * 1024
? (fileDetails.size / (1024 * 1024 * 1024)).toFixed(2) + " GB" ? (fileDetails.size / (1024 * 1024 * 1024)).toFixed(2) + " GB"
: fileDetails.size > 1024 * 1024 : fileDetails.size > 1024 * 1024
? (fileDetails.size / (1024 * 1024)).toFixed(2) + " MB" ? (fileDetails.size / (1024 * 1024)).toFixed(2) + " MB"
: fileDetails.size > 1024 : fileDetails.size > 1024
? (fileDetails.size / 1024).toFixed(2) + " KB" ? (fileDetails.size / 1024).toFixed(2) + " KB"
: fileDetails.size + " Bytes"} : fileDetails.size + " Bytes"}
</p> </p>
<p> <p>
<strong>Owner:</strong>{" "} <strong>Owner:</strong>{" "}