Skip to content

Commit

Permalink
Create usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
itaigilo committed Nov 23, 2024
1 parent b9ed97a commit a1c66bc
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions webui/src/mainEnt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import { createRoot } from 'react-dom/client';

// styles
import 'bootstrap/dist/css/bootstrap.css';
import './styles/globals.css';

// app and plugins system
import LakeFSApp from "./exported/lakefsApp";
import { PluginManager } from "./exported/plugins/pluginManager";

const pluginManager = new PluginManager();
// Register a plugin
const appTabsPlugin = {
tabs: [
{
id: 'extra-tab',
name: 'Extra Tab',
component: () => <div>Extra Tab Content</div>,
},
],
};
pluginManager.registerPluginAppTabs(appTabsPlugin);

const container = document.getElementById('root');
if (!container) throw new Error("Failed to find root element!");

const root = createRoot(container);
root.render(<LakeFSApp pluginManager={pluginManager}/>);

0 comments on commit a1c66bc

Please sign in to comment.