fix: remove unused import and clean up file size formatting logic
This commit is contained in:
parent
6115851147
commit
24d90a9412
@ -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>{" "}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user