more improvements
This commit is contained in:
@@ -128,7 +128,10 @@ export default function LinkCard(props: ILinkCardProps) {
|
||||
onClick={() => window.open(props.link.link, "_blank")}
|
||||
className="flex flex-row bg-gray-300 bg-opacity-25 py-5 px-3 items-center justify-start hover:cursor-pointer h-full"
|
||||
>
|
||||
<LinkIcon className="text-4xl mr-2" linkType={props.link.type} />
|
||||
<LinkIcon
|
||||
className="text-4xl mr-2 shrink-0"
|
||||
linkType={props.link.type}
|
||||
/>
|
||||
|
||||
<span className="flex flex-col items-baseline mr-10 space-y-1">
|
||||
<span className="text-md font-bold text-white text-ellipsis overflow-hidden">
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
FaFileImage,
|
||||
FaFilePdf,
|
||||
FaGithubSquare,
|
||||
FaGlobe,
|
||||
FaGoogleDrive,
|
||||
} from "react-icons/fa";
|
||||
import Link, { LinkType } from "../models/link";
|
||||
@@ -33,11 +34,11 @@ export default function LinkIcon(props: {
|
||||
|
||||
switch (linkType) {
|
||||
case LinkType.default:
|
||||
return <FaFileAlt {...rest} className={`${className} text-slate-300 `} />;
|
||||
return <FaGlobe {...rest} className={`${className} text-slate-300 `} />;
|
||||
case LinkType.atlassian:
|
||||
return <FaAtlassian {...rest} className={`${className} text-sky-500 `} />;
|
||||
case LinkType.codePile:
|
||||
return <FaFileCode {...rest} className={`${className} text-blue-500 `} />;
|
||||
return <FaFileCode {...rest} className={`${className} text-pink-200 `} />;
|
||||
case LinkType.github:
|
||||
return (
|
||||
<FaGithubSquare {...rest} className={`${className} text-gray-200 `} />
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Divider, Select, Switch, Tooltip } from "antd";
|
||||
const { Option } = Select;
|
||||
|
||||
import Modal from "antd/lib/modal/Modal";
|
||||
import { useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useAuth } from "../../contexts/authContext";
|
||||
import {
|
||||
@@ -18,9 +18,15 @@ const sendService = new SendService();
|
||||
|
||||
export default function CreateOrUpdateLink() {
|
||||
const { currUser } = useAuth();
|
||||
const { handleModalType, showModalType } = useKeyboardContext();
|
||||
const { pastedLink, handleModalType, showModalType } = useKeyboardContext();
|
||||
const { teamUsers, team } = useTeamDashboardContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (pastedLink) {
|
||||
setLink(pastedLink ?? "");
|
||||
}
|
||||
}, [pastedLink]);
|
||||
|
||||
function closeModal() {
|
||||
handleModalType(ShowModalType.na);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user