2023-07-19 16:49:54 -05:00
|
|
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
2023-12-01 15:29:17 -06:00
|
|
|
import React, { useState } from "react";
|
2023-12-01 16:44:34 -06:00
|
|
|
import NewLinkModal from "./ModalContent/NewLinkModal";
|
2023-07-19 16:49:54 -05:00
|
|
|
|
2023-08-30 23:00:57 -05:00
|
|
|
type Props = {
|
|
|
|
text?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function NoLinksFound({ text }: Props) {
|
2023-12-01 15:29:17 -06:00
|
|
|
const [newLinkModal, setNewLinkModal] = useState(false);
|
2023-07-19 16:49:54 -05:00
|
|
|
|
|
|
|
return (
|
2023-11-25 04:54:43 -06:00
|
|
|
<div className="border border-solid border-neutral-content w-full h-full flex flex-col justify-center p-10 rounded-2xl bg-base-200">
|
2023-11-24 07:39:55 -06:00
|
|
|
<p className="text-center text-2xl">
|
2023-08-30 23:00:57 -05:00
|
|
|
{text || "You haven't created any Links Here"}
|
2023-07-19 16:49:54 -05:00
|
|
|
</p>
|
2023-11-24 07:39:55 -06:00
|
|
|
<div className="text-center w-full mt-4">
|
2023-07-19 16:49:54 -05:00
|
|
|
<div
|
|
|
|
onClick={() => {
|
2023-12-01 15:29:17 -06:00
|
|
|
setNewLinkModal(true);
|
2023-07-19 16:49:54 -05:00
|
|
|
}}
|
2023-12-01 15:29:17 -06:00
|
|
|
className="inline-flex gap-1 relative w-[11rem] items-center btn btn-accent text-white group"
|
2023-07-19 16:49:54 -05:00
|
|
|
>
|
|
|
|
<FontAwesomeIcon
|
|
|
|
icon={faPlus}
|
2023-12-01 15:29:17 -06:00
|
|
|
className="w-5 h-5 left-4 group-hover:ml-[4rem] absolute duration-100"
|
2023-07-19 16:49:54 -05:00
|
|
|
/>
|
2023-08-30 23:00:57 -05:00
|
|
|
<span className="group-hover:opacity-0 text-right w-full duration-100">
|
|
|
|
Create New Link
|
2023-07-19 16:49:54 -05:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-01 16:42:45 -06:00
|
|
|
{newLinkModal ? (
|
|
|
|
<NewLinkModal onClose={() => setNewLinkModal(false)} />
|
|
|
|
) : undefined}
|
2023-07-19 16:49:54 -05:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|