menu fixes: add company links in general; add tracking to lang menu (#2902)
- the company links appear back in the burger menu. they could be selectively shown if mobile but i'd argue they should just always be there. - add the `track` to LanguageMenu to make the menu update. however, i'm a little annoyed that i don't understand why the Help menu already works without this :-/ ### Change Type - [x] `patch` — Bug fix ### Release Notes - Add company menu links back in and make sure the Language menu is updated on change.
This commit is contained in:
parent
a8ca235eaf
commit
e9dc9a1158
3 changed files with 5 additions and 3 deletions
|
@ -45,6 +45,7 @@ const components: TLComponents = {
|
||||||
<DefaultMainMenu>
|
<DefaultMainMenu>
|
||||||
<LocalFileMenu />
|
<LocalFileMenu />
|
||||||
<DefaultMainMenuContent />
|
<DefaultMainMenuContent />
|
||||||
|
<Links />
|
||||||
</DefaultMainMenu>
|
</DefaultMainMenu>
|
||||||
),
|
),
|
||||||
KeyboardShortcutsDialog: (props) => {
|
KeyboardShortcutsDialog: (props) => {
|
||||||
|
|
|
@ -67,6 +67,7 @@ const components: TLComponents = {
|
||||||
<DefaultMainMenu>
|
<DefaultMainMenu>
|
||||||
<MultiplayerFileMenu />
|
<MultiplayerFileMenu />
|
||||||
<DefaultMainMenuContent />
|
<DefaultMainMenuContent />
|
||||||
|
<Links />
|
||||||
</DefaultMainMenu>
|
</DefaultMainMenu>
|
||||||
),
|
),
|
||||||
KeyboardShortcutsDialog: (props) => {
|
KeyboardShortcutsDialog: (props) => {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { useEditor } from '@tldraw/editor'
|
import { track, useEditor } from '@tldraw/editor'
|
||||||
import { useUiEvents } from '../context/events'
|
import { useUiEvents } from '../context/events'
|
||||||
import { useLanguages } from '../hooks/useTranslation/useLanguages'
|
import { useLanguages } from '../hooks/useTranslation/useLanguages'
|
||||||
import { TldrawUiMenuCheckboxItem } from './primitives/menus/TldrawUiMenuCheckboxItem'
|
import { TldrawUiMenuCheckboxItem } from './primitives/menus/TldrawUiMenuCheckboxItem'
|
||||||
import { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'
|
import { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'
|
||||||
import { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'
|
import { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'
|
||||||
|
|
||||||
export function LanguageMenu() {
|
export const LanguageMenu = track(function LanguageMenu() {
|
||||||
const editor = useEditor()
|
const editor = useEditor()
|
||||||
const trackEvent = useUiEvents()
|
const trackEvent = useUiEvents()
|
||||||
const { languages, currentLanguage } = useLanguages()
|
const { languages, currentLanguage } = useLanguages()
|
||||||
|
@ -29,4 +29,4 @@ export function LanguageMenu() {
|
||||||
</TldrawUiMenuGroup>
|
</TldrawUiMenuGroup>
|
||||||
</TldrawUiMenuSubmenu>
|
</TldrawUiMenuSubmenu>
|
||||||
)
|
)
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue