diff --git a/package-lock.json b/package-lock.json index 8bc9e0e..6fc4352 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "duelfi", "version": "0.1.0", "dependencies": { + "@2toad/profanity": "^3.1.1", "@coral-xyz/anchor": "^0.31.0", "@fontsource/manrope": "^5.2.5", "@privy-io/react-auth": "^2.7.2", @@ -37,6 +38,15 @@ "typescript": "^5" } }, + "node_modules/@2toad/profanity": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@2toad/profanity/-/profanity-3.1.1.tgz", + "integrity": "sha512-07ny4pCSa4gDrcJ4vZ/WWmiM90+8kv/clXfnDvThf9IJq0GldpjRVdzHCfMwGDs2Y/8eClmTGzKb5tEfUWy/uA==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/@adraffy/ens-normalize": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", diff --git a/package.json b/package.json index d5cb854..143dd63 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@2toad/profanity": "^3.1.1", "@coral-xyz/anchor": "^0.31.0", "@fontsource/manrope": "^5.2.5", "@privy-io/react-auth": "^2.7.2", diff --git a/src/components/GlobalChat.tsx b/src/components/GlobalChat.tsx index e818611..f982ffd 100644 --- a/src/components/GlobalChat.tsx +++ b/src/components/GlobalChat.tsx @@ -5,7 +5,7 @@ import { usePrivy } from '@privy-io/react-auth'; import { io, Socket } from 'socket.io-client'; import { fetchUserById } from '@/shared/data_fetcher'; import { ChatBubbleLeftIcon, XMarkIcon } from '@heroicons/react/24/outline'; - +import { profanity } from '@2toad/profanity'; interface ChatMessage { id: string; user: string; @@ -139,7 +139,7 @@ export default function GlobalChat() { if (isCollapsed) { return ( -