Skip to content

Commit

Permalink
Separate ds-ext App into DiagramApp and TableApp
Browse files Browse the repository at this point in the history
  • Loading branch information
ajthinking committed Jan 12, 2025
1 parent 082ec0c commit 6fe86ab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { VsCodeToast } from './VsCodeToast';
import { onDrop } from './onDrop';
import { createVsCodeClient } from './createVsCodeClient';

export default function App() {
export default function DiagramApp() {
const client = createVsCodeClient(window.vscode);

const handleChange = useCallback(
Expand Down
9 changes: 9 additions & 0 deletions packages/ds-ext/src/app/TableApp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

export default function TableApp() {
return (
<div style={{ width: '100%', height: '100vh' }}>
This is the TableApp
</div>
);
}
6 changes: 4 additions & 2 deletions packages/ds-ext/src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import DiagramApp from './DiagramApp';
import TableApp from './TableApp';

// TypeScript null-check or assertion for the root element
const rootElement = document.getElementById('root') as HTMLElement | null;
Expand All @@ -10,7 +11,8 @@ if (rootElement) {
const root = ReactDOM.createRoot(rootElement);
root.render(
<React.StrictMode>
<App />
<DiagramApp />
{/* <TableApp /> */}
</React.StrictMode>
);
} else {
Expand Down

0 comments on commit 6fe86ab

Please sign in to comment.