search: added infinite scrolling support
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
c850857768
commit
ec1b131c3c
@ -1 +1,2 @@
|
||||
/**.js
|
||||
/**.js
|
||||
/**.js.map
|
@ -0,0 +1,18 @@
|
||||
import { Component } from "@/typings/component";
|
||||
import { CircularProgress } from "@nextui-org/progress";
|
||||
import { useVisibility } from "reactjs-visibility";
|
||||
|
||||
export const Loading: Component<{
|
||||
isFetching: boolean;
|
||||
onVisible: (visiblity: boolean) => void;
|
||||
}> = ({ onVisible, isFetching }) => {
|
||||
const { ref } = useVisibility({
|
||||
onChangeVisibility: onVisible
|
||||
});
|
||||
|
||||
return (
|
||||
<div ref={ref} className="flex items-center justify-center min-h-10">
|
||||
{isFetching && <CircularProgress aria-label="Loading more items..." />}
|
||||
</div>
|
||||
);
|
||||
};
|
@ -0,0 +1,6 @@
|
||||
export const videoSize = (
|
||||
aspectRatio: [number, number],
|
||||
size: number
|
||||
): [number, number] => {
|
||||
return [aspectRatio[0] * size, aspectRatio[1] * size];
|
||||
};
|
Loading…
Reference in new issue