mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-13 12:50:51 +08:00
Add APIClientProvider to widget
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { ReactWidget } from '@jupyterlab/ui-components';
|
||||
import React from 'react';
|
||||
import { JupyterLabEntrypoint } from './components/JupyterLabEntrypoint';
|
||||
import { JupyterlabAPIClient } from './apiClient';
|
||||
import { APIClientProvider } from '@optuna/optuna-dashboard';
|
||||
|
||||
const jupyterlabAPIClient = new JupyterlabAPIClient();
|
||||
|
||||
export class OptunaDashboardWidget extends ReactWidget {
|
||||
constructor() {
|
||||
@@ -9,6 +13,10 @@ export class OptunaDashboardWidget extends ReactWidget {
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
return <JupyterLabEntrypoint />;
|
||||
return (
|
||||
<APIClientProvider apiClient={jupyterlabAPIClient}>
|
||||
<JupyterLabEntrypoint />
|
||||
</APIClientProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user