Skip to content

Commit

Permalink
debug log?
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Jan 11, 2025
1 parent 84a86b7 commit e1cc8ac
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/waku/src/minimal/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ export const callServerRsc = async (
args: unknown[],
fetchCache = defaultFetchCache,
) => {
const enhanceFetch = fetchCache[ENHANCE_FETCH] || ((f) => f);
const enhanceFetch =
fetchCache[ENHANCE_FETCH] ||
((f) =>
(...args) => {
console.log('--------fetching1', args[0]);
return f(...args);
});
const enhanceCreateData = fetchCache[ENHANCE_CREATE_DATA] || ((d) => d);
const createData = (responsePromise: Promise<Response>) =>
createFromFetch<Awaited<Elements>>(checkStatus(responsePromise), {
Expand Down Expand Up @@ -130,7 +136,13 @@ const fetchRscInternal = (
rscParams: unknown,
fetchCache: FetchCache,
) => {
const enhanceFetch = fetchCache[ENHANCE_FETCH] || ((f) => f);
const enhanceFetch =
fetchCache[ENHANCE_FETCH] ||
((f) =>
(...args) => {
console.log('--------fetching2', args[0]);
return f(...args);
});
return rscParams === undefined
? enhanceFetch(fetch)(url)
: rscParams instanceof URLSearchParams
Expand Down

0 comments on commit e1cc8ac

Please sign in to comment.