simon | 26e79f7 | 2022-10-05 22:16:08 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2022 Savoir-faire Linux Inc. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU Affero General Public License as |
| 6 | * published by the Free Software Foundation; either version 3 of the |
| 7 | * License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU Affero General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Affero General Public |
| 15 | * License along with this program. If not, see |
| 16 | * <https://www.gnu.org/licenses/>. |
| 17 | */ |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 18 | import { Route, Routes } from 'react-router-dom'; |
Adrien Béraud | ab519ff | 2022-05-03 15:34:48 -0400 | [diff] [blame] | 19 | |
simon | 1170c32 | 2022-10-31 14:51:31 -0400 | [diff] [blame] | 20 | import { RouteParams } from '../utils/hooks'; |
| 21 | import CallInterface from './CallInterface'; |
simon | fe1de72 | 2022-10-02 00:21:43 -0400 | [diff] [blame] | 22 | import Messenger from './Messenger'; |
Adrien Béraud | 6c93496 | 2021-06-07 10:13:26 -0400 | [diff] [blame] | 23 | |
simon | 1170c32 | 2022-10-31 14:51:31 -0400 | [diff] [blame] | 24 | export type CallRouteParams = RouteParams<{ conversationId: string }, { video?: 'true' }>; |
| 25 | |
simon | fe1de72 | 2022-10-02 00:21:43 -0400 | [diff] [blame] | 26 | export default function JamiMessenger() { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 27 | return ( |
| 28 | <Routes> |
| 29 | <Route path="addContact/:contactId" element={<Messenger />} /> |
| 30 | <Route path="conversation/:conversationId" element={<Messenger />} /> |
simon | 1170c32 | 2022-10-31 14:51:31 -0400 | [diff] [blame] | 31 | <Route path="call/:conversationId" element={<CallInterface />} /> |
simon | fe1de72 | 2022-10-02 00:21:43 -0400 | [diff] [blame] | 32 | <Route path="*" element={<Messenger />} /> |
Adrien Béraud | ab519ff | 2022-05-03 15:34:48 -0400 | [diff] [blame] | 33 | </Routes> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 34 | ); |
Adrien Béraud | ab519ff | 2022-05-03 15:34:48 -0400 | [diff] [blame] | 35 | } |