mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-26 03:28:38 +02:00
fix build
This commit is contained in:
@@ -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"
|
ARG PATH="/node-v20.12.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
ENV PATH="${PATH}"
|
ENV PATH="${PATH}"
|
||||||
|
|
||||||
RUN npm install -g yarn@1.22
|
# RUN npm install -g yarn@1.22
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
# copy server
|
# copy server
|
||||||
COPY server/ /app/server/
|
COPY server/ /app/server/
|
||||||
RUN cd /app/server/ && yarn install
|
RUN cd /app/server/ && npm install
|
||||||
|
|
||||||
# setup entrypoint
|
# setup entrypoint
|
||||||
ADD ./docker-entrypoint.sh docker-entrypoint.sh
|
ADD ./docker-entrypoint.sh docker-entrypoint.sh
|
||||||
|
@@ -15,7 +15,7 @@ import { useBreakpointValue } from "../../../providers/global/breakpoint-provide
|
|||||||
import useEventIntersectionRef from "../../../hooks/use-event-intersection-ref";
|
import useEventIntersectionRef from "../../../hooks/use-event-intersection-ref";
|
||||||
|
|
||||||
function CustomGalleryImage({ event, ...props }: EmbeddedImageProps & { event: NostrEvent }) {
|
function CustomGalleryImage({ event, ...props }: EmbeddedImageProps & { event: NostrEvent }) {
|
||||||
const ref = useEventIntersectionRef(event);
|
const ref = useEventIntersectionRef<HTMLImageElement>(event);
|
||||||
|
|
||||||
return <GalleryImage {...props} event={event} ref={ref} />;
|
return <GalleryImage {...props} event={event} ref={ref} />;
|
||||||
}
|
}
|
||||||
|
@@ -4,8 +4,8 @@ import { NostrEvent } from "nostr-tools";
|
|||||||
|
|
||||||
import { useRegisterIntersectionEntity } from "../providers/local/intersection-observer";
|
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);
|
const ref = useRef<T | null>(null);
|
||||||
useRegisterIntersectionEntity(ref, getEventUID(event));
|
useRegisterIntersectionEntity(ref, event ? getEventUID(event) : undefined);
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ import CommunityPostMenu from "./community-post-menu";
|
|||||||
import useEventIntersectionRef from "../../../hooks/use-event-intersection-ref";
|
import useEventIntersectionRef from "../../../hooks/use-event-intersection-ref";
|
||||||
|
|
||||||
export function ApprovalIcon({ approval }: { approval: NostrEvent }) {
|
export function ApprovalIcon({ approval }: { approval: NostrEvent }) {
|
||||||
const ref = useEventIntersectionRef(approval);
|
const ref = useEventIntersectionRef<HTMLAnchorElement>(approval);
|
||||||
|
|
||||||
return <UserAvatarLink pubkey={approval.pubkey} ref={ref} size="xs" />;
|
return <UserAvatarLink pubkey={approval.pubkey} ref={ref} size="xs" />;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user