a tool for shared writing and social publishing
0

Configure Feed

Select the types of activity you want to include in your feed.

restore archive on mailbox blocks

Jared Pereira (Apr 29, 2026, 11:10 AM EDT) 9e90e8cc e100d4ea

+20
+20
components/Blocks/MailboxBlock.tsx
··· 1 1 import { BlockProps, BlockLayout } from "./Block"; 2 2 import { useUIState } from "src/useUIState"; 3 + import { useEntity, useReplicache } from "src/replicache"; 4 + import { focusPage } from "src/utils/focusPage"; 3 5 4 6 export const MailboxBlock = ( 5 7 props: BlockProps & { ··· 10 12 let isSelected = useUIState((s) => 11 13 s.selectedBlocks.find((b) => b.value === props.entityID), 12 14 ); 15 + let archive = useEntity(props.entityID, "mailbox/archive"); 16 + let { rep } = useReplicache(); 13 17 return ( 14 18 <BlockLayout 15 19 isSelected={!!isSelected} ··· 24 28 <div className="text-tertiary text-sm"> 25 29 Email subscriptions have moved to publication newsletters. 26 30 </div> 31 + {archive && ( 32 + <button 33 + className="text-accent-contrast hover:underline text-sm mt-1" 34 + onMouseDown={(e) => { 35 + e.preventDefault(); 36 + if (rep) { 37 + useUIState 38 + .getState() 39 + .openPage(props.parent, archive.data.value); 40 + focusPage(archive.data.value, rep); 41 + } 42 + }} 43 + > 44 + See past posts 45 + </button> 46 + )} 27 47 </BlockLayout> 28 48 ); 29 49 };