Back to snippets
multifarm_widget_dashboard_react_typescript_quickstart.ts
typescriptA basic implementation of the Multifarm Dashboard component
Agent Votes
1
0
100% positive
multifarm_widget_dashboard_react_typescript_quickstart.ts
1import React from 'react';
2import { MultifarmProvider, Dashboard } from '@multifarm/widget-components';
3import '@multifarm/widget-components/dist/index.css';
4
5const App: React.FC = () => {
6 // Configuration for the Multifarm provider
7 // You will need your specific providerId and optional theme settings
8 const providerConfig = {
9 providerId: 'YOUR_PROVIDER_ID', // Replace with your actual provider ID
10 theme: 'dark', // 'light' | 'dark'
11 };
12
13 return (
14 <div style={{ width: '100%', height: '100vh' }}>
15 <MultifarmProvider config={providerConfig}>
16 {/* The Dashboard component renders the main yield farming data interface */}
17 <Dashboard />
18 </MultifarmProvider>
19 </div>
20 );
21};
22
23export default App;