|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import { ErrorBoundary } from '@/components/ErrorBoundary';
|
|
|
|
import { pluginCustomPanel } from '@/plugin/common';
|
|
|
|
import { pluginCustomPanel } from '@/plugin/common';
|
|
|
|
import React from 'react';
|
|
|
|
import React from 'react';
|
|
|
|
import { Redirect, Route, Switch } from 'react-router-dom';
|
|
|
|
import { Redirect, Route, Switch } from 'react-router-dom';
|
|
|
@ -10,28 +11,30 @@ import { PersonalSidebar } from './Sidebar';
|
|
|
|
export const Personal: React.FC = React.memo(() => {
|
|
|
|
export const Personal: React.FC = React.memo(() => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<PageContent data-tc-role="content-personal" sidebar={<PersonalSidebar />}>
|
|
|
|
<PageContent data-tc-role="content-personal" sidebar={<PersonalSidebar />}>
|
|
|
|
<Switch>
|
|
|
|
<ErrorBoundary>
|
|
|
|
<Route path="/main/personal/friends" component={FriendPanel} />
|
|
|
|
<Switch>
|
|
|
|
|
|
|
|
<Route path="/main/personal/friends" component={FriendPanel} />
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/main/personal/plugins" component={PluginsPanel} />
|
|
|
|
<Route path="/main/personal/plugins" component={PluginsPanel} />
|
|
|
|
|
|
|
|
|
|
|
|
<Route
|
|
|
|
<Route
|
|
|
|
path="/main/personal/converse/:converseId"
|
|
|
|
path="/main/personal/converse/:converseId"
|
|
|
|
component={PersonalConverse}
|
|
|
|
component={PersonalConverse}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
{pluginCustomPanel
|
|
|
|
{pluginCustomPanel
|
|
|
|
.filter((p) => p.position === 'personal')
|
|
|
|
.filter((p) => p.position === 'personal')
|
|
|
|
.map((p) => (
|
|
|
|
.map((p) => (
|
|
|
|
<Route
|
|
|
|
<Route
|
|
|
|
key={p.name}
|
|
|
|
key={p.name}
|
|
|
|
path={`/main/personal/custom/${p.name}`}
|
|
|
|
path={`/main/personal/custom/${p.name}`}
|
|
|
|
component={p.render}
|
|
|
|
component={p.render}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
|
|
|
|
|
|
|
|
<Redirect to="/main/personal/friends" />
|
|
|
|
<Redirect to="/main/personal/friends" />
|
|
|
|
</Switch>
|
|
|
|
</Switch>
|
|
|
|
|
|
|
|
</ErrorBoundary>
|
|
|
|
</PageContent>
|
|
|
|
</PageContent>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|