diff --git a/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx b/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx index b16aae77..9fc80f74 100644 --- a/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx +++ b/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx @@ -60,16 +60,20 @@ export function setInteractionState( }; // Update query parameter when drawer state changes - if (typeof window !== "undefined" && (updatedState.drawerOpen !== undefined || updatedState.drawer !== undefined)) { + if ( + typeof window !== "undefined" && + (updatedState.drawerOpen !== undefined || + updatedState.drawer !== undefined) + ) { const url = new URL(window.location.href); const newDocState = newState[document_uri]; - + if (newDocState.drawerOpen && newDocState.drawer) { url.searchParams.set("interactionDrawer", newDocState.drawer); } else { url.searchParams.delete("interactionDrawer"); } - + window.history.replaceState({}, "", url.toString()); } @@ -126,7 +130,8 @@ export const Interactions = (props: { else setInteractionState(document_uri, { drawerOpen: false }); }} > - {props.quotesCount}{" "} + Post quotes + {props.quotesCount}{" "} {!props.compact && `Quote${props.quotesCount === 1 ? "" : "s"}`} {props.showComments === false ? null : ( @@ -138,7 +143,8 @@ export const Interactions = (props: { else setInteractionState(document_uri, { drawerOpen: false }); }} > - {props.commentsCount}{" "} + Post comments + {props.commentsCount}{" "} {!props.compact && `Comment${props.commentsCount === 1 ? "" : "s"}`} )}