mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
528 B
TypeScript
19 lines
528 B
TypeScript
import React from 'react';
|
|
import { Personal } from './Personal';
|
|
import { Navigate, Route, Routes } from 'react-router-dom';
|
|
import { Group } from './Group';
|
|
|
|
export const MainContent: React.FC = React.memo(() => {
|
|
return (
|
|
<Routes>
|
|
<Route path="/personal/*" element={<Personal />} />
|
|
<Route path="/group/:groupId/*" element={<Group />} />
|
|
<Route
|
|
path="/"
|
|
element={<Navigate to="/main/personal" replace={true} />}
|
|
/>
|
|
</Routes>
|
|
);
|
|
});
|
|
MainContent.displayName = 'MainContent';
|