cal.pub0.org/apps/web/lib/hooks/useCurrentUserId.ts

10 lines
193 B
TypeScript

import useMeQuery from "./useMeQuery";
export const useCurrentUserId = () => {
const query = useMeQuery();
const user = query.data;
return user?.id;
};
export default useCurrentUserId;