* refactor(solana): remove support for solana * chore: update @thirdweb-dev/react and @thirdweb-dev/sdk versions * remove unused code & re-update-next-versions * refactor: Remove unused Solana currency metadata * fix build
19 lines
484 B
TypeScript
19 lines
484 B
TypeScript
import { useIsMinter } from "@3rdweb-sdk/react/hooks/useContractRoles";
|
|
import { ValidContractInstance } from "@thirdweb-dev/sdk";
|
|
import { ComponentWithChildren } from "types/component-with-children";
|
|
|
|
interface IMinterOnlyProps {
|
|
contract?: ValidContractInstance;
|
|
}
|
|
|
|
export const MinterOnly: ComponentWithChildren<IMinterOnlyProps> = ({
|
|
children,
|
|
contract,
|
|
}) => {
|
|
const isMinter = useIsMinter(contract);
|
|
if (!isMinter) {
|
|
return null;
|
|
}
|
|
return <>{children}</>;
|
|
};
|