Skip to content

Commit

Permalink
Revert "fix(organization): 👽 fix ci issue due to clerk upgrade"
Browse files Browse the repository at this point in the history
This reverts commit 07949c8.
  • Loading branch information
vignesh-gupta committed Jun 11, 2024
1 parent 07949c8 commit 1461a2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/(main)/dashboard/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Input } from "@/components/ui/input";
import { api } from "@/convex/_generated/api";
import useApiMutation from "@/lib/hooks/use-api-mutation";
import { useQuery } from "convex/react";
import { Copy, Loader2, RefreshCcw, Trash } from "lucide-react";
import { Copy, RefreshCcw, Trash } from "lucide-react";
import { toast } from "sonner";

const AccountSettingsPage = () => {
Expand Down Expand Up @@ -38,8 +38,6 @@ const AccountSettingsPage = () => {
.catch(() => toast.error("Failed to revoke API key"));
};

if (existingAPIKey === undefined) return <Loader2 className="animate-spin" />;

return (
<>
{existingAPIKey ? (
Expand Down
2 changes: 1 addition & 1 deletion app/api/webhooks/clerk/utils/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function mapOrgJsonToOrg(orgJson: OrganizationJSON): Organization {
return {
clerkId: orgJson.id,
name: orgJson.name,
imageUrl: orgJson.image_url || "",
imageUrl: orgJson.image_url,
createdBy: orgJson.created_by,
};
}
2 changes: 1 addition & 1 deletion app/api/webhooks/clerk/utils/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function mapUserJsonToUser(userJson: UserJSON): User {
userJson.email_addresses.find(
(email) => email.id === userJson.primary_email_address_id
)?.email_address || `${userJson.id}@nothanks.com`,
firstName: userJson.first_name,
firstName: userJson.first_name ?? userJson.id,
imageUrl: userJson.image_url,
};
}

0 comments on commit 1461a2d

Please sign in to comment.