⏳ Returns the remaining count of the selected item until the lot close.


Authentication required to use this hook


Specific only for *Buy Now Collection Item

The item will be automatically selected based on url parameters from urlPattern (see MojitoHooksProvider for more details).

Hooks Sample Code

import useCollectionItemRemainingCount from "mojito-hooks/useCollectionItemRemainingCount";

function App {
    const { remainingCount, isLoading } = useCollectionItemRemainingCount();

    if(isLoading) return <Loader />;

    return <DrawCountdown remainingCount={remainingCount} />;


slugThe slug of the collection to load. Optional.StringDynamic from page url (see urlPatterns)
pathnamePage url pathname that contains collection slug. Optional.StringThe page url


pathname can be used to pass the url pathname on SSR.


remainingCountThe remanding time in ms util lot close.Number
isLoadingDisplay request loading status, provided for convenience.Boolean
errorThe error object for the query, if an error was thrown.Error
refetchA function to manually refetch the query.(options: T) => Promise<U>
queryResultOriginal React-Query query result.QueryResult<T>