@@ -7,8 +7,10 @@ import useLogo from "@/hooks/useLogo";
77import Workspace from "@/models/workspace" ;
88import { NavLink } from "react-router-dom" ;
99import { LAST_VISITED_WORKSPACE } from "@/utils/constants" ;
10+ import { useTranslation } from "react-i18next" ;
1011
1112export default function DefaultChatContainer ( ) {
13+ const { t } = useTranslation ( ) ;
1214 const { user } = useUser ( ) ;
1315 const { logo } = useLogo ( ) ;
1416 const [ lastVisitedWorkspace , setLastVisitedWorkspace ] = useState ( null ) ;
@@ -84,18 +86,10 @@ export default function DefaultChatContainer() {
8486 className = " w-[200px] h-fit mb-5 rounded-lg"
8587 />
8688 < h1 className = "text-white text-2xl font-semibold" >
87- Welcome , { user . username } !
89+ { t ( "home.welcome" ) } , { user . username } !
8890 </ h1 >
89- < p className = "text-theme-home-text-secondary text-base text-center" >
90- { hasWorkspaces ? (
91- < > Choose a workspace to start chatting!</ >
92- ) : (
93- < >
94- You currently aren't assigned to any workspaces. < br />
95- Please contact your administrator to request access to a
96- workspace.
97- </ >
98- ) }
91+ < p className = "text-theme-home-text-secondary text-base text-center whitespace-pre-line" >
92+ { hasWorkspaces ? t ( "home.chooseWorkspace" ) : t ( "home.notAssigned" ) }
9993 </ p >
10094 { hasWorkspaces && (
10195 < NavLink
@@ -104,7 +98,10 @@ export default function DefaultChatContainer() {
10498 ) }
10599 className = "text-sm font-medium mt-[10px] w-fit px-4 h-[34px] flex items-center justify-center rounded-lg cursor-pointer bg-theme-home-button-secondary hover:bg-theme-home-button-secondary-hover text-theme-home-button-secondary-text hover:text-theme-home-button-secondary-hover-text transition-all duration-200"
106100 >
107- Go to "{ lastVisitedWorkspace ?. name || workspaces [ 0 ] . name } " →
101+ { t ( "home.goToWorkspace" , {
102+ workspace : lastVisitedWorkspace ?. name || workspaces [ 0 ] . name ,
103+ } ) } { " " }
104+ →
108105 </ NavLink >
109106 ) }
110107 </ div >
0 commit comments