improvements

This commit is contained in:
Daniel
2023-05-29 02:44:44 +03:30
parent 8f5dba6ed4
commit 271231120c
8 changed files with 15 additions and 30 deletions
@@ -30,8 +30,6 @@ export default function TeamManagement({
const [collection, setCollection] =
useState<CollectionIncludingMembers>(activeCollection);
const [isPublic, setIsPublic] = useState(false);
const currentURL = new URL(document.URL);
const publicCollectionURL = `${currentURL.origin}/public/collections/${collection.id}`;
@@ -87,15 +85,17 @@ export default function TeamManagement({
<Checkbox
label="Make this a public collection."
state={isPublic}
onClick={() => setIsPublic(!isPublic)}
state={collection.isPublic}
onClick={() =>
setCollection({ ...collection, isPublic: !collection.isPublic })
}
/>
<p className="text-gray-500 text-sm">
This will let <b>Anyone</b> to view this collection.
</p>
{isPublic ? (
{collection.isPublic ? (
<div>
<p className="mb-2 text-gray-500">Public Link (Click to copy)</p>
<div