Skip to content

Commit 0f72c74

Browse files
committed
fix: async
1 parent 2da6bde commit 0f72c74

File tree

1 file changed

+5
-5
lines changed
  • apps/dashboard/app/(main)/websites/[id]/settings/privacy

1 file changed

+5
-5
lines changed

apps/dashboard/app/(main)/websites/[id]/settings/privacy/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,27 @@ export default function PrivacyPage() {
2626
? `${window.location.origin}/websites/${websiteId}`
2727
: '';
2828

29-
const handleTogglePublic = useCallback(async () => {
29+
const handleTogglePublic = useCallback(() => {
3030
if (!websiteData) {
3131
return;
3232
}
3333

34-
await toast.promise(
34+
toast.promise(
3535
toggleMutation.mutateAsync({ id: websiteId, isPublic: !isPublic }),
3636
{
3737
loading: 'Updating privacy settings...',
3838
success: 'Privacy settings updated successfully',
3939
error: 'Failed to update privacy settings',
4040
}
4141
);
42-
await refetch();
42+
refetch();
4343
}, [websiteData, websiteId, isPublic, toggleMutation, refetch]);
4444

45-
const handleCopyLink = useCallback(async () => {
45+
const handleCopyLink = useCallback(() => {
4646
if (!shareableLink) {
4747
return;
4848
}
49-
await navigator.clipboard.writeText(shareableLink);
49+
navigator.clipboard.writeText(shareableLink);
5050
toast.success('Link copied to clipboard!');
5151
}, [shareableLink]);
5252

0 commit comments

Comments
 (0)