Skip to content

Commit

Permalink
Merge pull request #272 from opeolluwa/master
Browse files Browse the repository at this point in the history
app-v0.6.19
  • Loading branch information
opeolluwa authored Sep 19, 2023
2 parents b9b82ef + 05bd214 commit d84ab85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lazy_static! {
let db_path = format!(
"{downloads_dir}/{db_path}",
downloads_dir = os_default_downloads_dir.display(),
db_path = ".dat"
db_path = "store"
);
// create the path if not exist path if not exist
let _ = std::fs::create_dir_all(&db_path);
Expand Down
20 changes: 11 additions & 9 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import Link from "next/link";
import { useEffect, useState } from "react";
import { CommandData } from "../../core/bindings/CommandData";
import { TransferHistory } from "../../core/bindings/TransferHistory";
import { AppData } from "@/types";
import { computeFileSize } from "@/utils";

interface QuickAccessTab {
name: string;
Expand Down Expand Up @@ -137,15 +139,15 @@ export default function Main() {
</tr>
</thead>
<tbody className="text-gray-500">
{isLoading ? <LoaderCircle /> : (
transferHistory.data?.map((file, index) => (
<tr key={index}>
<td className="px-6 py-4">{file.fileName}</td>
<td className="px-6 py-4">{file.fileSize}</td>
<td className="px-6 py-4">{file.date}</td>
</tr>
))
)}
{transferHistory?.data?.map((file, index) => (
<tr key={index}>
<td className="px-6 py-4">{file.fileName}</td>
<td className="px-6 py-4">
{computeFileSize(Number(file.fileSize))}
</td>
<td className="px-6 py-4">{file.date}</td>
</tr>
))}
</tbody>
</table>
</div>
Expand Down

0 comments on commit d84ab85

Please sign in to comment.