feat: change to center and clean code
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
import clsx from 'clsx';
|
||||
import { useNewNavigate } from '@/modules';
|
||||
const serverList = ['container', 'panel', 'publish', 'code-editor', 'map', 'ai-chat'];
|
||||
const serverList = ['container', 'map'];
|
||||
const serverPath = [
|
||||
{
|
||||
path: 'container',
|
||||
links: ['edit/list', 'preview/:id', 'edit/:id'],
|
||||
},
|
||||
{
|
||||
path: 'panel',
|
||||
links: ['edit/list', 'flow/:id', 'deck/:id'],
|
||||
},
|
||||
{
|
||||
path: 'app',
|
||||
links: ['edit/list', ':app/version/list'],
|
||||
@@ -18,26 +14,10 @@ const serverPath = [
|
||||
path: 'file',
|
||||
links: ['edit/list'],
|
||||
},
|
||||
{
|
||||
path: 'publish',
|
||||
links: ['edit/list'],
|
||||
},
|
||||
{
|
||||
path: 'map',
|
||||
links: ['/'],
|
||||
},
|
||||
{
|
||||
path: 'prompt',
|
||||
links: ['/'],
|
||||
},
|
||||
{
|
||||
path: 'agent',
|
||||
links: ['edit/list'],
|
||||
},
|
||||
{
|
||||
path: 'chat',
|
||||
links: ['history/list', 'session/list', 'chat-prompt/list'],
|
||||
},
|
||||
{
|
||||
path: 'org',
|
||||
links: ['edit/list'],
|
||||
@@ -52,7 +32,7 @@ const ServerPath = () => {
|
||||
<div className='flex flex-col w-full'>
|
||||
{serverPath.map((item) => {
|
||||
const links = item.links.map((link) => {
|
||||
const hasId = link.includes(':id');
|
||||
const hasId = link.includes(':');
|
||||
const _path = link === '/' ? item.path : item.path + '/' + link;
|
||||
return (
|
||||
<div
|
||||
|
Reference in New Issue
Block a user