Skip to content

Commit

Permalink
🚸(feedback) remember the user about feedback form on call end
Browse files Browse the repository at this point in the history
add a new route that just tells the user about the feedback form
  • Loading branch information
manuhabitela committed Jul 29, 2024
1 parent ed52123 commit ee1abbe
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/features/rooms/components/Conference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Conference = ({
audio={userConfig.audioEnabled}
video={userConfig.videoEnabled}
onDisconnected={() => {
navigateTo('home')
navigateTo('feedback')
}}
>
<VideoConference />
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/features/rooms/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { Room as RoomRoute } from './routes/Room'
export { FeedbackRoute } from './routes/Feedback'
export { roomIdPattern, isRoomValid } from './utils/isRoomValid'
export { generateRoomId } from './utils/generateRoomId'
19 changes: 19 additions & 0 deletions src/frontend/src/features/rooms/routes/Feedback.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useTranslation } from 'react-i18next'
import { BoxScreen } from '@/layout/BoxScreen'
import { Div, Link, P } from '@/primitives'

export const FeedbackRoute = () => {
const { t } = useTranslation('rooms')
return (
<BoxScreen title={t('feedback.heading')}>
<Div textAlign="left">
<P>{t('feedback.body')}</P>
</Div>
<Div marginTop={1}>
<P>
<Link to="/">{t('backToHome', { ns: 'global' })}</Link>
</P>
</Div>
</BoxScreen>
)
}
4 changes: 4 additions & 0 deletions src/frontend/src/locales/de/rooms.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"feedback": {
"body": "",
"heading": ""
},
"join": {
"camlabel": "",
"heading": "",
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/locales/en/rooms.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"feedback": {
"body": "Please fill out the form available in the header to give us your precious feedback! Thanks.",
"heading": "Help us improve Meet"
},
"join": {
"camlabel": "Camera",
"heading": "Join the meeting",
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/locales/fr/rooms.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"feedback": {
"body": "Remplissez le formulaire disponible dans l'entête du site pour nous donner votre avis sur l'outil. Vos retours sont précieux ! Merci.",
"heading": "Aidez-nous à améliorer Meet"
},
"join": {
"camlabel": "Webcam",
"heading": "Rejoindre la réunion",
Expand Down
9 changes: 7 additions & 2 deletions src/frontend/src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { RoomRoute, roomIdPattern } from '@/features/rooms'
import { FeedbackRoute, RoomRoute, roomIdPattern } from '@/features/rooms'
import { HomeRoute } from '@/features/home'

export const routes: Record<
'home' | 'room',
'home' | 'room' | 'feedback',
{
name: RouteName
path: RegExp | string
Expand All @@ -22,6 +22,11 @@ export const routes: Record<
to: (roomId: string) => `/${roomId.trim()}`,
Component: RoomRoute,
},
feedback: {
name: 'feedback',
path: '/feedback',
Component: FeedbackRoute,
},
}

export type RouteName = keyof typeof routes

0 comments on commit ee1abbe

Please sign in to comment.