-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add theme and language selections in user menu (#593)
* add theme selection in user menu * add language selector in user nav * fix type issues in design system
- Loading branch information
1 parent
0e2fbf6
commit 71a1f2f
Showing
8 changed files
with
142 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
import { useTranslation } from 'react-i18next' | ||
import { useNavigate } from 'react-router-dom' | ||
|
||
import { SandboxRoot } from '@harnessio/ui/views' | ||
|
||
import { useAppContext } from '../framework/context/AppContext' | ||
import { useThemeStore } from '../framework/context/ThemeContext' | ||
import { useTranslationStore } from '../i18n/stores/i18n-store' | ||
import { useNav } from './stores/recent-pinned-nav-links.store' | ||
|
||
const RootWrapper = () => { | ||
const { currentUser } = useAppContext() | ||
const navigate = useNavigate() | ||
const { t } = useTranslation() | ||
|
||
return <SandboxRoot t={t} currentUser={currentUser} useNav={useNav} logout={() => navigate('/logout')} /> | ||
return ( | ||
<SandboxRoot | ||
currentUser={currentUser} | ||
useNav={useNav} | ||
useThemeStore={useThemeStore} | ||
useTranslationStore={useTranslationStore} | ||
logout={() => navigate('/logout')} | ||
/> | ||
) | ||
} | ||
|
||
export default RootWrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters