@@ -4,6 +4,7 @@ import {
|
||||
} from "@/types/global";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useGetLink } from "@/hooks/store/links";
|
||||
|
||||
type Props = {
|
||||
name: string;
|
||||
@@ -20,6 +21,8 @@ export default function PreservedFormatRow({
|
||||
link,
|
||||
downloadable,
|
||||
}: Props) {
|
||||
const getLink = useGetLink();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
let isPublic = router.pathname.startsWith("/public") ? true : undefined;
|
||||
@@ -49,9 +52,11 @@ export default function PreservedFormatRow({
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex justify-between items-center pr-1 border border-neutral-content rounded-md">
|
||||
<div className="flex gap-2 items-center">
|
||||
<i className={`${icon} text-2xl text-primary`} />
|
||||
<div className="bg-primary text-primary-content p-2 rounded-l-md">
|
||||
<i className={`${icon} text-2xl`} />
|
||||
</div>
|
||||
<p>{name}</p>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +64,7 @@ export default function PreservedFormatRow({
|
||||
{downloadable || false ? (
|
||||
<div
|
||||
onClick={() => handleDownload()}
|
||||
className="btn btn-sm btn-square btn-ghost"
|
||||
className="btn btn-sm btn-square"
|
||||
>
|
||||
<i className="bi-cloud-arrow-down text-xl text-neutral" />
|
||||
</div>
|
||||
@@ -70,9 +75,9 @@ export default function PreservedFormatRow({
|
||||
isPublic ? "/public" : ""
|
||||
}/preserved/${link?.id}?format=${format}`}
|
||||
target="_blank"
|
||||
className="btn btn-sm btn-square btn-ghost"
|
||||
className="btn btn-sm btn-square"
|
||||
>
|
||||
<i className="bi-box-arrow-up-right text-lg text-neutral" />
|
||||
<i className="bi-box-arrow-up-right text-xl text-neutral" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user