refactor(client): typed localStorage
This commit is contained in:
@@ -9,6 +9,7 @@ import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { url } from '@/config';
|
||||
import { noteActions } from '@/store';
|
||||
import { notePage } from '@/filters/note';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
|
||||
export function getNoteMenu(props: {
|
||||
note: misskey.entities.Note;
|
||||
@@ -181,7 +182,7 @@ export function getNoteMenu(props: {
|
||||
props.translating.value = true;
|
||||
const res = await os.api('notes/translate', {
|
||||
noteId: appearNote.id,
|
||||
targetLang: localStorage.getItem('lang') || navigator.language,
|
||||
targetLang: miLocalStorage.getItem('lang') || navigator.language,
|
||||
});
|
||||
props.translating.value = false;
|
||||
props.translation.value = res;
|
||||
|
Reference in New Issue
Block a user