fix: DialogDescription export for production build

This commit is contained in:
Ryan Salazar
2026-06-26 21:10:30 -04:00
parent e03d929977
commit efbd54443d
3 changed files with 49 additions and 9 deletions

View File

@@ -32,14 +32,21 @@ export function CannedMessagesPanel({ compact, onSelect }: CannedMessagesPanelPr
const [newContent, setNewContent] = useState(""); const [newContent, setNewContent] = useState("");
const [error, setError] = useState(""); const [error, setError] = useState("");
useEffect(() => {
let cancelled = false;
(async () => {
const data = await loadCannedMessages(user?.id);
if (!cancelled) setMessages(data);
})();
return () => {
cancelled = true;
};
}, [user?.id]);
const refresh = async () => { const refresh = async () => {
setMessages(await loadCannedMessages(user?.id)); setMessages(await loadCannedMessages(user?.id));
}; };
useEffect(() => {
refresh();
}, [user?.id]);
const startEdit = (msg: CannedMessage) => { const startEdit = (msg: CannedMessage) => {
setEditing(msg.id); setEditing(msg.id);
setEditTitle(msg.title); setEditTitle(msg.title);

View File

@@ -42,6 +42,21 @@ export function PhotoGalleryManager({ onVerifyClick }: PhotoGalleryManagerProps)
const fileRef = useRef<HTMLInputElement>(null); const fileRef = useRef<HTMLInputElement>(null);
const blurExplicit = mustBlurExplicit(profile?.id_verified); const blurExplicit = mustBlurExplicit(profile?.id_verified);
useEffect(() => {
let cancelled = false;
(async () => {
const data = await loadGallery(user?.id);
if (!cancelled) {
setAlbums(data.albums);
setPhotos(data.photos);
setLoading(false);
}
})();
return () => {
cancelled = true;
};
}, [user?.id]);
const refresh = async () => { const refresh = async () => {
const data = await loadGallery(user?.id); const data = await loadGallery(user?.id);
setAlbums(data.albums); setAlbums(data.albums);
@@ -49,10 +64,6 @@ export function PhotoGalleryManager({ onVerifyClick }: PhotoGalleryManagerProps)
setLoading(false); setLoading(false);
}; };
useEffect(() => {
refresh();
}, [user?.id]);
const albumPhotos = photos.filter( const albumPhotos = photos.filter(
(p) => (p) =>
activeAlbum === "main" activeAlbum === "main"

View File

@@ -61,4 +61,26 @@ const DialogTitle = React.forwardRef<
)); ));
DialogTitle.displayName = DialogPrimitive.Title.displayName; DialogTitle.displayName = DialogPrimitive.Title.displayName;
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogTitle }; const DialogDescription = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Description>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Description
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
DialogDescription.displayName = DialogPrimitive.Description.displayName;
export {
Dialog,
DialogPortal,
DialogOverlay,
DialogTrigger,
DialogClose,
DialogContent,
DialogHeader,
DialogTitle,
DialogDescription,
};