OKWidget Component
If you don't want to manually build a user interface for OKInteraction
, you can use our turnkey component OKWidget
.
OKWidget
will embed UI components automatically generated by the OKcontract Interactions Hub into your React app:
// Example interaction: supply USDC on Compound III
const interactionID = "QOmvyY302kRJNSgyRrvW";
...
<OKContract>
<OKInstance>
<OKWidget id={interactionID} />
</OKInstance>
</OKContract>
The UI will be similar to the preview on the interaction page on the OKcontract Interactions Hub.