Route /chats/new to ChatIndex

environments/review-chats-g56n7m/deployments/1169
Alex Gleason 2022-09-28 19:16:20 -05:00
rodzic 2791d3453a
commit e582eda17e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -29,6 +29,10 @@ const ChatPageSidebar = () => {
history.push(`/chats/${chat.id}`);
};
const handleChatCreate = () => {
history.push('/chats/new');
};
return (
<Stack space={4} className='h-full'>
<Stack space={4} className='px-4 pt-4'>
@ -38,6 +42,7 @@ const ChatPageSidebar = () => {
<IconButton
src={require('@tabler/icons/edit.svg')}
iconClassName='w-5 h-5 text-gray-600'
onClick={handleChatCreate}
/>
</HStack>

Wyświetl plik

@ -243,6 +243,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
{features.profileDirectory && <WrappedRoute path='/directory' publicRoute page={DefaultPage} component={Directory} content={children} />}
{features.chats && <WrappedRoute path='/chats' exact page={ChatsPage} component={ChatIndex} content={children} />}
{features.chats && <WrappedRoute path='/chats/new' page={ChatsPage} component={ChatIndex} content={children} />}
{features.chats && <WrappedRoute path='/chats/:chatId' page={ChatsPage} component={ChatIndex} content={children} />}
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />