Skip to content

Commit

Permalink
Hotfix: Profanity is no longer allowed in hacker tag when changing in…
Browse files Browse the repository at this point in the history
… settings menu
  • Loading branch information
jacobellerbrock committed Sep 24, 2024
1 parent 60368ec commit 4ff3be9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/web/src/components/settings/AccountSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { modifyAccountSettings } from "@/actions/user-profile-mod";
import { Checkbox } from "@/components/shadcn/ui/checkbox";
import c from "config";
import { Loader2 } from "lucide-react";
import { isProfane } from "no-profanity";

interface UserProps {
firstName: string;
Expand Down Expand Up @@ -151,6 +152,11 @@ export default function AccountSettings({ user }: { user: UserProps }) {
<Button
className="mt-5"
onClick={() => {
if (isProfane(newHackerTag)) {
toast.dismiss();
toast.error("Profanity is not allowed");
return;
}
toast.loading("Updating settings...");
runModifyAccountSettings({
firstName: newFirstName,
Expand Down

0 comments on commit 4ff3be9

Please sign in to comment.