replaced viewteam modal with new modal
This commit is contained in:
@@ -17,7 +17,6 @@ import useAccountStore from "@/store/account";
|
|||||||
import usePermissions from "@/hooks/usePermissions";
|
import usePermissions from "@/hooks/usePermissions";
|
||||||
import ProfilePhoto from "../ProfilePhoto";
|
import ProfilePhoto from "../ProfilePhoto";
|
||||||
import addMemberToCollection from "@/lib/client/addMemberToCollection";
|
import addMemberToCollection from "@/lib/client/addMemberToCollection";
|
||||||
import Checkbox from "../Checkbox";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
modalId: string;
|
modalId: string;
|
||||||
@@ -171,8 +170,8 @@ export default function EditCollectionSharingModal({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{collection.isPublic ? (
|
{collection.isPublic ? (
|
||||||
<div className="pl-5">
|
<div className={permissions === true ? "pl-5" : ""}>
|
||||||
<p className="mb-2">Public Link (Click to copy)</p>
|
<p className="mb-2">Sharable Link (Click to copy)</p>
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import FilterSearchDropdown from "@/components/FilterSearchDropdown";
|
|||||||
import SortDropdown from "@/components/SortDropdown";
|
import SortDropdown from "@/components/SortDropdown";
|
||||||
import useLocalSettingsStore from "@/store/localSettings";
|
import useLocalSettingsStore from "@/store/localSettings";
|
||||||
import SearchBar from "@/components/SearchBar";
|
import SearchBar from "@/components/SearchBar";
|
||||||
|
import EditCollectionSharingModal from "@/components/Modals/EditCollectionSharingModal";
|
||||||
|
|
||||||
const cardVariants: Variants = {
|
const cardVariants: Variants = {
|
||||||
offscreen: {
|
offscreen: {
|
||||||
@@ -97,6 +98,9 @@ export default function PublicCollections() {
|
|||||||
fetchOwner();
|
fetchOwner();
|
||||||
}, [collection]);
|
}, [collection]);
|
||||||
|
|
||||||
|
const [editCollectionSharingModal, setEditCollectionSharingModal] =
|
||||||
|
useState(false);
|
||||||
|
|
||||||
return collection ? (
|
return collection ? (
|
||||||
<div
|
<div
|
||||||
className="h-screen"
|
className="h-screen"
|
||||||
@@ -144,16 +148,7 @@ export default function PublicCollections() {
|
|||||||
<div className="flex gap-1 justify-center sm:justify-end items-center w-fit">
|
<div className="flex gap-1 justify-center sm:justify-end items-center w-fit">
|
||||||
<div
|
<div
|
||||||
className="flex items-center btn px-2 btn-ghost rounded-full"
|
className="flex items-center btn px-2 btn-ghost rounded-full"
|
||||||
onClick={() =>
|
onClick={() => setEditCollectionSharingModal(true)}
|
||||||
setModal({
|
|
||||||
modal: "COLLECTION",
|
|
||||||
state: true,
|
|
||||||
method: "VIEW_TEAM",
|
|
||||||
isOwner: false,
|
|
||||||
active: collection,
|
|
||||||
defaultIndex: 0,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{collectionOwner.id ? (
|
{collectionOwner.id ? (
|
||||||
<ProfilePhoto
|
<ProfilePhoto
|
||||||
@@ -241,6 +236,12 @@ export default function PublicCollections() {
|
|||||||
</p> */}
|
</p> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<EditCollectionSharingModal
|
||||||
|
isOpen={editCollectionSharingModal}
|
||||||
|
onClose={() => setEditCollectionSharingModal(false)}
|
||||||
|
modalId={"edit-collection-sharing-modal" + collection.id}
|
||||||
|
activeCollection={collection}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
|
|||||||
Reference in New Issue
Block a user