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.
pull/2908/head
Mime Čuvalo 2024-02-21 15:19:56 +00:00 zatwierdzone przez GitHub
rodzic a8ca235eaf
commit e9dc9a1158
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -45,6 +45,7 @@ const components: TLComponents = {
<DefaultMainMenu>
<LocalFileMenu />
<DefaultMainMenuContent />
<Links />
</DefaultMainMenu>
),
KeyboardShortcutsDialog: (props) => {

Wyświetl plik

@ -67,6 +67,7 @@ const components: TLComponents = {
<DefaultMainMenu>
<MultiplayerFileMenu />
<DefaultMainMenuContent />
<Links />
</DefaultMainMenu>
),
KeyboardShortcutsDialog: (props) => {

Wyświetl plik

@ -1,11 +1,11 @@
import { useEditor } from '@tldraw/editor'
import { track, useEditor } from '@tldraw/editor'
import { useUiEvents } from '../context/events'
import { useLanguages } from '../hooks/useTranslation/useLanguages'
import { TldrawUiMenuCheckboxItem } from './primitives/menus/TldrawUiMenuCheckboxItem'
import { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'
import { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'
export function LanguageMenu() {
export const LanguageMenu = track(function LanguageMenu() {
const editor = useEditor()
const trackEvent = useUiEvents()
const { languages, currentLanguage } = useLanguages()
@ -29,4 +29,4 @@ export function LanguageMenu() {
</TldrawUiMenuGroup>
</TldrawUiMenuSubmenu>
)
}
})