Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

code improvements

Pedro Ladeira503e1fc46e36
diff --git a/apps/web/tests/partner-groups/lander-markdown.test.ts b/apps/web/tests/partner-groups/lander-markdown.test.ts
index 08eae1bbc4..13c944f4de 100644
--- a/apps/web/tests/partner-groups/lander-markdown.test.ts
+++ b/apps/web/tests/partner-groups/lander-markdown.test.ts
@@ -18,7 +18,7 @@ const FEATURE_FOR_ELEMENT: Record<string, RichTextFeature | null> = {
ol: "lists",
li: "lists",
blockquote: "quote",
- code: "code",
+ code: null,
table: "tables",
thead: "tables",
tbody: "tables",
@@ -51,7 +51,7 @@ describe("lander markdown", () => {
expect(unmapped).toEqual([]);
});
- test.each(["img", "del", "hr", "pre", "input"])(
+ test.each(["img", "del", "hr", "pre", "code", "input"])(
"keeps rendering %s",
(element) => {
expect(LANDER_MARKDOWN_ALLOWED_ELEMENTS).toContain(element);
diff --git a/apps/web/ui/partners/groups/design/lander/lander-rich-text-editor.tsx b/apps/web/ui/partners/groups/design/lander/lander-rich-text-editor.tsx
index b3c662ea06..04858a524d 100644
--- a/apps/web/ui/partners/groups/design/lander/lander-rich-text-editor.tsx
+++ b/apps/web/ui/partners/groups/design/lander/lander-rich-text-editor.tsx
@@ -19,7 +19,6 @@ export const LANDER_RICH_TEXT_FEATURES: RichTextFeature[] = [
"lists",
"tables",
"quote",
- "code",
];
export function LanderRichTextEditor({
@@ -84,7 +83,9 @@ function TextLength({
const onChangeRef = useRef(onChange);
onChangeRef.current = onChange;
- useEffect(() => onChangeRef.current?.(length), [length]);
+ useEffect(() => {
+ onChangeRef.current?.(length);
+ }, [length]);
return maxLength === undefined ? null : (
<div className="mt-1 text-left">