fix build

This commit is contained in:
hzrd149 2024-05-30 11:52:40 -05:00
parent b4c4c7a9f2
commit 421f27d19b
4 changed files with 6 additions and 6 deletions

View File

@ -36,14 +36,14 @@ RUN rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
ARG PATH="/node-v20.12.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ENV PATH="${PATH}"
RUN npm install -g yarn@1.22
# RUN npm install -g yarn@1.22
WORKDIR /app
COPY --from=builder /app/dist /usr/share/nginx/html
# copy server
COPY server/ /app/server/
RUN cd /app/server/ && yarn install
RUN cd /app/server/ && npm install
# setup entrypoint
ADD ./docker-entrypoint.sh docker-entrypoint.sh

View File

@ -15,7 +15,7 @@ import { useBreakpointValue } from "../../../providers/global/breakpoint-provide
import useEventIntersectionRef from "../../../hooks/use-event-intersection-ref";
function CustomGalleryImage({ event, ...props }: EmbeddedImageProps & { event: NostrEvent }) {
const ref = useEventIntersectionRef(event);
const ref = useEventIntersectionRef<HTMLImageElement>(event);
return <GalleryImage {...props} event={event} ref={ref} />;
}

View File

@ -4,8 +4,8 @@ import { NostrEvent } from "nostr-tools";
import { useRegisterIntersectionEntity } from "../providers/local/intersection-observer";
export default function useEventIntersectionRef<T extends HTMLElement = HTMLDivElement>(event: NostrEvent) {
export default function useEventIntersectionRef<T extends HTMLElement = HTMLDivElement>(event?: NostrEvent) {
const ref = useRef<T | null>(null);
useRegisterIntersectionEntity(ref, getEventUID(event));
useRegisterIntersectionEntity(ref, event ? getEventUID(event) : undefined);
return ref;
}

View File

@ -32,7 +32,7 @@ import CommunityPostMenu from "./community-post-menu";
import useEventIntersectionRef from "../../../hooks/use-event-intersection-ref";
export function ApprovalIcon({ approval }: { approval: NostrEvent }) {
const ref = useEventIntersectionRef(approval);
const ref = useEventIntersectionRef<HTMLAnchorElement>(approval);
return <UserAvatarLink pubkey={approval.pubkey} ref={ref} size="xs" />;
}