a tool for shared writing and social publishing

removed a lot of stray console.log

+17 -35
+5 -5
actions/createPublicationDraft.ts
··· 11 11 redirectUser: false, 12 12 firstBlockType: "text", 13 13 }); 14 - console.log( 15 - await supabaseServerClient 16 - .from("leaflets_in_publications") 17 - .insert({ publication: publication_uri, leaflet: newLeaflet, doc: null }), 18 - ); 14 + 15 + await supabaseServerClient 16 + .from("leaflets_in_publications") 17 + .insert({ publication: publication_uri, leaflet: newLeaflet, doc: null }); 18 + 19 19 return newLeaflet; 20 20 }
-4
actions/emailAuth.ts
··· 74 74 .where(eq(email_auth_tokens.id, tokenId)); 75 75 76 76 if (!token || !token.email) { 77 - console.log("no token?"); 78 77 client.end(); 79 78 return null; 80 79 } 81 80 82 81 if (token.confirmation_code !== code) { 83 - console.log("wrong code???"); 84 82 client.end(); 85 83 return null; 86 84 } 87 85 88 86 if (token.confirmed) { 89 - console.log("already confirmed?????"); 90 87 client.end(); 91 88 return null; 92 89 } ··· 100 97 101 98 if (existingToken) { 102 99 if (existingToken.identities?.email) { 103 - console.log("wat"); 104 100 } 105 101 await db 106 102 .update(identities)
+4 -7
actions/publishToPublication.ts
··· 109 109 validate: false, //TODO publish the lexicon so we can validate! 110 110 }); 111 111 112 - console.log( 113 - await supabaseServerClient.from("documents").upsert({ 114 - uri: result.uri, 115 - data: record as Json, 116 - }), 117 - ); 112 + await supabaseServerClient.from("documents").upsert({ 113 + uri: result.uri, 114 + data: record as Json, 115 + }); 118 116 await Promise.all([ 119 117 //Optimistically put these in! 120 118 supabaseServerClient.from("documents_in_publications").upsert({ ··· 305 303 let facets: PubLeafletRichtextFacet.Main[] = []; 306 304 let delta = node.toDelta() as Delta[]; 307 305 let byteStart = 0; 308 - console.log(delta); 309 306 for (let d of delta) { 310 307 let unicodestring = new UnicodeString(d.insert); 311 308 let facet: PubLeafletRichtextFacet.Main = {
-1
app/api/oauth/[route]/route.ts
··· 46 46 } 47 47 case "callback": { 48 48 const params = new URLSearchParams(req.url.split("?")[1]); 49 - console.log(params); 50 49 51 50 //TODO remember to reset this to a better default! 52 51 let redirectPath = "/lish";
-1
app/lish/createPub/CreatePubForm.tsx
··· 171 171 let status = await callRPC("get_leaflet_subdomain_status", { 172 172 domain: props.domain, 173 173 }); 174 - console.log(status); 175 174 if (status.error === "Not Found") 176 175 props.setDomainState({ status: "valid" }); 177 176 else props.setDomainState({ status: "invalid" });
-1
app/lish/createPub/createPublication.ts
··· 87 87 88 88 // Create the custom domain 89 89 if (isProductionDomain()) { 90 - console.log("Creating domain! " + domain); 91 90 await vercel.projects.addProjectDomain({ 92 91 idOrName: "prj_9jX4tmYCISnm176frFxk07fF74kG", 93 92 teamId: "team_42xaJiZMTw9Sr7i0DcLTae9d",
-1
components/ActionBar/ActionButton.tsx
··· 21 21 let inOpenPopover = useContext(PopoverOpenContext); 22 22 useEffect(() => { 23 23 if (inOpenPopover) { 24 - console.log("inOpenPopover"); 25 24 sidebar.setChildForceOpen(true); 26 25 return () => { 27 26 sidebar.setChildForceOpen(false);
-1
components/Blocks/BlueskyPostBlock/BlueskyEmpty.tsx
··· 103 103 urlValue !== "" 104 104 ) { 105 105 e.preventDefault(); 106 - console.log("hello!"); 107 106 } 108 107 }} 109 108 />
-1
components/Pages/useCardBorderHidden.ts
··· 8 8 9 9 let cardBorderHidden = 10 10 useEntity(entityID, "theme/card-border-hidden") || rootCardBorderHidden; 11 - console.log(cardBorderHidden, rootCardBorderHidden); 12 11 if (!cardBorderHidden && !rootCardBorderHidden) { 13 12 if (data?.[0]) return true; 14 13 return false;
-1
components/ThemeManager/PageThemePickers.tsx
··· 133 133 attribute: "theme/card-border-hidden", 134 134 data: { type: "boolean", value: !pageBorderHidden }, 135 135 }); 136 - console.log(pageBorderHidden); 137 136 }} 138 137 > 139 138 No Page Borders
-1
src/utils/focusBlock.ts
··· 30 30 // focus the editor using the mouse position if needed 31 31 let nextBlockID = block.value; 32 32 let nextBlock = useEditorStates.getState().editorStates[nextBlockID]; 33 - console.log(nextBlock); 34 33 if (!nextBlock || !nextBlock.view) return; 35 34 let nextBlockViewClientRect = nextBlock.view.dom.getBoundingClientRect(); 36 35 let tr = nextBlock.editor.tr;
+2 -2
src/utils/isBot.ts
··· 1 1 import { cookies, headers, type UnsafeUnwrappedHeaders } from "next/headers"; 2 2 export function getIsBot() { 3 - const userAgent = (headers() as unknown as UnsafeUnwrappedHeaders).get("user-agent") || ""; 4 - console.log("User agent: ", userAgent); 3 + const userAgent = 4 + (headers() as unknown as UnsafeUnwrappedHeaders).get("user-agent") || ""; 5 5 const botPatterns = [ 6 6 /bot/i, 7 7 /crawler/i,
-1
src/utils/isProductionDeployment.ts
··· 1 1 export function isProductionDomain() { 2 2 let vercel_env = process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.VERCEL_ENV; 3 - console.log({ vercel_env }); 4 3 return process.env.NODE_ENV === "production" && vercel_env === "production"; 5 4 }