* change banner to commercekit * change bg * progress check * a lot more progress * minor changes * small changes * correct folder name * fix copy * ui fixes * lots of copy fixes * one small fix * some more small fixes * minor fix * more fixes * new publish og * small changes * few new cases * small fix * rename folder * add redirect * Update LaunchSection.tsx --------- Co-authored-by: Jonas Daniels <[email protected]> Co-authored-by: Nacho Iacovino <[email protected]>
18 lines
482 B
TypeScript
18 lines
482 B
TypeScript
import { useQueryWithNetwork } from "@3rdweb-sdk/react/hooks/query/useQueryWithNetwork";
|
|
import { useSDK } from "@thirdweb-dev/react";
|
|
|
|
export function useContractSources(contractAddress?: string) {
|
|
const sdk = useSDK();
|
|
return useQueryWithNetwork(
|
|
["contract-sources", contractAddress],
|
|
async () => {
|
|
return sdk
|
|
?.getPublisher()
|
|
.fetchContractSourcesFromAddress(contractAddress || "");
|
|
},
|
|
{
|
|
enabled: !!contractAddress,
|
|
},
|
|
);
|
|
}
|