From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:21:31 +0000 (-0400) Subject: make suggested changes X-Git-Url: http://these/git/%7Bthis.state.url%7D?a=commitdiff_plain;h=2d4c9dd1c207432b5e8aaaa15efb9ea5e94aecb9;p=lemmy-ui.git make suggested changes --- diff --git a/lemmy-translations b/lemmy-translations index 7fc71d0..c9a0788 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 7fc71d0860bbe5c6d620ec27112350ffe5b9229c +Subproject commit c9a07885f35cf334d3cf167cb57587a8177fc3fb diff --git a/src/shared/components/post/post-form.tsx b/src/shared/components/post/post-form.tsx index 02a5906..9742b34 100644 --- a/src/shared/components/post/post-form.tsx +++ b/src/shared/components/post/post-form.tsx @@ -1,3 +1,4 @@ +import { debounce } from "@utils/helpers"; import autosize from "autosize"; import { Component, InfernoNode, linkEvent } from "inferno"; import { @@ -32,7 +33,6 @@ import { validURL, webArchiveUrl, } from "../../utils"; -import debounce from "../../utils/helpers/debounce"; import { Icon, Spinner } from "../common/icon"; import { LanguageSelect } from "../common/language-select"; import { MarkdownTextArea } from "../common/markdown-textarea"; diff --git a/src/shared/env.ts b/src/shared/env.ts index 2f3a5cf..287912d 100644 --- a/src/shared/env.ts +++ b/src/shared/env.ts @@ -1,4 +1,4 @@ -import isBrowser from "./utils/browser/is-browser"; +import { isBrowser } from "@utils/browser"; const testHost = "0.0.0.0:8536"; diff --git a/src/shared/i18next.ts b/src/shared/i18next.ts index d0a4e58..ff5f77f 100644 --- a/src/shared/i18next.ts +++ b/src/shared/i18next.ts @@ -1,3 +1,4 @@ +import { isBrowser } from "@utils/browser"; import i18next, { i18nTyped, Resource } from "i18next"; import { UserService } from "./services"; import { ar } from "./translations/ar"; @@ -31,7 +32,6 @@ import { sv } from "./translations/sv"; import { vi } from "./translations/vi"; import { zh } from "./translations/zh"; import { zh_Hant } from "./translations/zh_Hant"; -import isBrowser from "./utils/browser/is-browser"; export const languages = [ { resource: ar, code: "ar", name: "العربية" }, diff --git a/src/shared/services/UserService.ts b/src/shared/services/UserService.ts index 18d0804..346d833 100644 --- a/src/shared/services/UserService.ts +++ b/src/shared/services/UserService.ts @@ -1,11 +1,11 @@ // import Cookies from 'js-cookie'; +import { isBrowser } from "@utils/browser"; import IsomorphicCookie from "isomorphic-cookie"; import jwt_decode from "jwt-decode"; import { LoginResponse, MyUserInfo } from "lemmy-js-client"; import { isHttps } from "../env"; import { i18n } from "../i18next"; import { isAuthPath, toast } from "../utils"; -import isBrowser from "../utils/browser/is-browser"; interface Claims { sub: number; diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 35e30a3..ad1e8a4 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1,3 +1,5 @@ +import { isBrowser } from "@utils/browser"; +import { debounce, groupBy } from "@utils/helpers"; import { Picker } from "emoji-mart"; import emojiShortName from "emoji-short-name"; import { @@ -50,9 +52,6 @@ import { } from "./interfaces"; import { HttpService, UserService } from "./services"; import { RequestState } from "./services/HttpService"; -import isBrowser from "./utils/browser/is-browser"; -import debounce from "./utils/helpers/debounce"; -import { groupBy } from "./utils/helpers/group-by"; let Tribute: any; if (isBrowser()) {