chore(examples): cleanup

This commit is contained in:
moklick
2022-09-19 15:41:23 +02:00
parent 1cf3a570b6
commit ed9e3701af
2 changed files with 18 additions and 6 deletions
+16 -6
View File
@@ -2,6 +2,7 @@ import { ChangeEvent } from 'react';
import { BrowserRouter, Route, Routes, useLocation, useNavigate } from 'react-router-dom';
import Basic from '../examples/Basic';
import Backgrounds from '../examples/Backgrounds';
import ControlledUncontrolled from '../examples/ControlledUncontrolled';
import CustomConnectionLine from '../examples/CustomConnectionLine';
import CustomNode from '../examples/CustomNode';
@@ -33,6 +34,7 @@ import UseUpdateNodeInternals from '../examples/UseUpdateNodeInternals';
import UseReactFlow from '../examples/UseReactFlow';
import Validation from '../examples/Validation';
import UseKeyPress from '../examples/UseKeyPress';
import EdgeRouting from '../examples/EdgeRouting';
const routes = [
{
@@ -40,8 +42,12 @@ const routes = [
component: Basic,
},
{
path: '/default-nodes',
component: DefaultNodes,
path: '/backgrounds',
component: Backgrounds,
},
{
path: '/controlled-uncontrolled',
component: ControlledUncontrolled,
},
{
path: '/custom-connectionline',
@@ -51,6 +57,10 @@ const routes = [
path: '/custom-node',
component: CustomNode,
},
{
path: '/default-nodes',
component: DefaultNodes,
},
{
path: '/draghandle',
component: DragHandle,
@@ -67,6 +77,10 @@ const routes = [
path: '/edge-types',
component: EdgeTypes,
},
{
path: '/edge-routing',
component: EdgeRouting,
},
{
path: '/empty',
component: Empty,
@@ -155,10 +169,6 @@ const routes = [
path: '/validation',
component: Validation,
},
{
path: '/controlled-uncontrolled',
component: ControlledUncontrolled,
},
{
path: '/use-key-press',
component: UseKeyPress,
@@ -10,6 +10,7 @@ import ReactFlow, {
useNodesState,
useEdgesState,
MarkerType,
MiniMap,
} from 'reactflow';
import styles from './multiflows.module.css';
@@ -70,6 +71,7 @@ const Flow: FC<{ id: string }> = ({ id }) => {
id={id}
>
<Background />
<MiniMap />
</ReactFlow>
</ReactFlowProvider>
);