Skip to content

Commit

Permalink
Merge pull request #1314 from Chioma227/fix/toggle-invite-link-visibi…
Browse files Browse the repository at this point in the history
…lity

Fix/toggle invite link visibility
  • Loading branch information
incredible-phoenix246 authored Aug 24, 2024
2 parents be09f01 + 1206257 commit 5655d6a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ const Members = () => {
const [isModalOpen, setIsModalOpen] = useState(false);
const [exporting, setExporting] = useState(false);
const [text, setText] = useState("Export CSV");
const [isVisible, setIsVisible] = useState<boolean>(false);

const toggleVisibility = () => {
setIsVisible(!isVisible);
};

const { toast } = useToast();
const handleCopy = () => {
Expand Down Expand Up @@ -160,25 +165,28 @@ const Members = () => {
<input
type="checkbox"
className="peer sr-only"
onChange={() => {}}
onChange={toggleVisibility}
checked={isVisible}
/>
<div className="peer h-6 w-11 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-orange-600 peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:ring-4 peer-focus:ring-orange-300 dark:border-gray-600 dark:bg-gray-700 dark:peer-focus:ring-orange-800"></div>
</label>
</div>
</div>

<div className="flex w-full justify-between">
<CustomButton variant="outline" className="w-full overflow-hidden">
https://www.figma.com/design/7hCSTNzQOJLl9aww6wEEd1/Managing-Users----Team-Learn-AI?node-i
</CustomButton>
<CustomButton
variant="primary"
className="ml-8 space-x-4"
onClick={handleCopy}
>
Copy link
</CustomButton>
</div>
{isVisible && (
<div className="flex w-full justify-between">
<CustomButton variant="outline" className="w-full overflow-hidden">
https://www.figma.com/design/7hCSTNzQOJLl9aww6wEEd1/Managing-Users----Team-Learn-AI?node-i
</CustomButton>
<CustomButton
variant="primary"
className="ml-8 space-x-4"
onClick={handleCopy}
>
Copy link
</CustomButton>
</div>
)}
</div>
<div className="w-full space-y-2">
<h4 className="text-lg font-medium">Manage members</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ const PaymentInformation = () => {
</div>
</div>
</div>

<div className="max-w-[1000px]">
<p>Compare all features</p>
</div>
</div>
);
};
Expand Down
2 changes: 0 additions & 2 deletions src/components/layouts/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ const Footer = () => {
{ route: "termsOfUse", link: "/terms-and-conditions" },
];

//

return (
<footer className="bg-background dark:bg-default">
<div className="px-4">
Expand Down

0 comments on commit 5655d6a

Please sign in to comment.