diff --git a/src/common/app.tsx b/src/common/app.tsx index cc3cc475f31..51ad4560c3e 100644 --- a/src/common/app.tsx +++ b/src/common/app.tsx @@ -85,7 +85,7 @@ const EntryPage = (props: any) => { const PurchaseContainer = loadable(() => import("./pages/purchase")); const PurchasePage = (props: any) => ; -const DecksPage = loadable(() => import("./pages/decks")); +const DecksPage = loadable(() => import("./features/decks/screens/decks")); const EcencyPerksPage = loadable(() => import("./features/perks/screens/main")); const App = (props: any) => { diff --git a/src/common/components/entry-vote-btn/_index.scss b/src/common/components/entry-vote-btn/_index.scss index 5426b039530..5f11049cba3 100644 --- a/src/common/components/entry-vote-btn/_index.scss +++ b/src/common/components/entry-vote-btn/_index.scss @@ -1,5 +1,5 @@ @import "src/style/vars_mixins"; -@import "../decks/columns/helpers/helpers"; +@import "../../features/decks/columns/helpers/helpers"; .entry-vote-btn { margin-right: 10px; diff --git a/src/common/components/navbar/sidebar/navbar-side.tsx b/src/common/components/navbar/sidebar/navbar-side.tsx index 10a54115a41..9d50a374a1a 100644 --- a/src/common/components/navbar/sidebar/navbar-side.tsx +++ b/src/common/components/navbar/sidebar/navbar-side.tsx @@ -7,11 +7,11 @@ import { History } from "history"; import { Button } from "@ui/button"; import { closeSvg } from "../../../img/svg"; import { NavbarPerksButton } from "../navbar-perks-button"; -import { walletIconSvg } from "../../decks/icons"; import { useMappedStore } from "../../../store/use-mapped-store"; import { NavbarNotificationsButton } from "../navbar-notifications-button"; import { UilEditAlt } from "@iconscout/react-unicons"; import { classNameObject } from "../../../helper/class-name-object"; +import { walletIconSvg } from "../../../features/decks/icons"; interface Props { show: boolean; diff --git a/src/common/components/search-box/index.tsx b/src/common/components/search-box/index.tsx index 9d37f29d8cc..f02c51e45db 100644 --- a/src/common/components/search-box/index.tsx +++ b/src/common/components/search-box/index.tsx @@ -4,8 +4,8 @@ import { copyContent } from "../../img/svg"; import { success } from "../feedback"; import "./_index.scss"; import { FormControl, InputGroup } from "@ui/input"; -import { searchIconSvg } from "../decks/icons"; import { Button } from "@ui/button"; +import { searchIconSvg } from "../../features/decks/icons"; type Props = any; diff --git a/src/common/features/chats/components/chats-community-actions/index.tsx b/src/common/features/chats/components/chats-community-actions/index.tsx index 4b76de857be..c12b76a3432 100644 --- a/src/common/features/chats/components/chats-community-actions/index.tsx +++ b/src/common/features/chats/components/chats-community-actions/index.tsx @@ -13,8 +13,8 @@ import { import { BlockedUsersModal } from "./blocked-users-modal"; import { useCommunityCache } from "../../../../core"; import { useMappedStore } from "../../../../store/use-mapped-store"; -import { userIconSvg } from "../../../../components/decks/icons"; import { HiddenMessagesModal } from "./hidden-messages-modal"; +import { userIconSvg } from "../../../decks/icons"; interface Props { channel?: Channel; diff --git a/src/common/components/decks/_deck-floating-manager.scss b/src/common/features/decks/_deck-floating-manager.scss similarity index 100% rename from src/common/components/decks/_deck-floating-manager.scss rename to src/common/features/decks/_deck-floating-manager.scss diff --git a/src/common/components/decks/_deck-toolbar.scss b/src/common/features/decks/_deck-toolbar.scss similarity index 100% rename from src/common/components/decks/_deck-toolbar.scss rename to src/common/features/decks/_deck-toolbar.scss diff --git a/src/common/components/decks/_deck.scss b/src/common/features/decks/_deck.scss similarity index 100% rename from src/common/components/decks/_deck.scss rename to src/common/features/decks/_deck.scss diff --git a/src/common/components/decks/_index.scss b/src/common/features/decks/_index.scss similarity index 100% rename from src/common/components/decks/_index.scss rename to src/common/features/decks/_index.scss diff --git a/src/common/components/decks/columns/_deck-login-overlay-placeholder.scss b/src/common/features/decks/columns/_deck-login-overlay-placeholder.scss similarity index 100% rename from src/common/components/decks/columns/_deck-login-overlay-placeholder.scss rename to src/common/features/decks/columns/_deck-login-overlay-placeholder.scss diff --git a/src/common/components/decks/columns/_deck-wallet-balance-column.scss b/src/common/features/decks/columns/_deck-wallet-balance-column.scss similarity index 100% rename from src/common/components/decks/columns/_deck-wallet-balance-column.scss rename to src/common/features/decks/columns/_deck-wallet-balance-column.scss diff --git a/src/common/components/decks/columns/_deck-whats-new-column.scss b/src/common/features/decks/columns/_deck-whats-new-column.scss similarity index 100% rename from src/common/components/decks/columns/_deck-whats-new-column.scss rename to src/common/features/decks/columns/_deck-whats-new-column.scss diff --git a/src/common/components/decks/columns/add-column/_deck-add-column.scss b/src/common/features/decks/columns/add-column/_deck-add-column.scss similarity index 100% rename from src/common/components/decks/columns/add-column/_deck-add-column.scss rename to src/common/features/decks/columns/add-column/_deck-add-column.scss diff --git a/src/common/components/decks/columns/add-column/common.ts b/src/common/features/decks/columns/add-column/common.ts similarity index 100% rename from src/common/components/decks/columns/add-column/common.ts rename to src/common/features/decks/columns/add-column/common.ts diff --git a/src/common/components/decks/columns/add-column/deck-add-column-community-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-community-settings.tsx similarity index 97% rename from src/common/components/decks/columns/add-column/deck-add-column-community-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-community-settings.tsx index 8842f4f1533..be7825bf57f 100644 --- a/src/common/components/decks/columns/add-column/deck-add-column-community-settings.tsx +++ b/src/common/features/decks/columns/add-column/deck-add-column-community-settings.tsx @@ -1,7 +1,7 @@ import { useMappedStore } from "../../../../store/use-mapped-store"; import React, { useContext, useState } from "react"; import { DeckGridContext } from "../../deck-manager"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { DeckAddColumnSearchBox } from "./deck-add-column-search-box"; import { SettingsProps, UsernameDataItem } from "./common"; import { COMMUNITY_CONTENT_TYPES, ICONS } from "../../consts"; diff --git a/src/common/components/decks/columns/add-column/deck-add-column-notifications-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-notifications-settings.tsx similarity index 97% rename from src/common/components/decks/columns/add-column/deck-add-column-notifications-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-notifications-settings.tsx index 499b87228b5..5a6131d5ac5 100644 --- a/src/common/components/decks/columns/add-column/deck-add-column-notifications-settings.tsx +++ b/src/common/features/decks/columns/add-column/deck-add-column-notifications-settings.tsx @@ -1,7 +1,7 @@ import { useMappedStore } from "../../../../store/use-mapped-store"; import React, { useContext, useState } from "react"; import { DeckGridContext } from "../../deck-manager"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { DeckAddColumnSearchBox } from "./deck-add-column-search-box"; import { SettingsProps, UsernameDataItem } from "./common"; import { ICONS, NOTIFICATION_CONTENT_TYPES } from "../../consts"; diff --git a/src/common/components/decks/columns/add-column/deck-add-column-search-box.tsx b/src/common/features/decks/columns/add-column/deck-add-column-search-box.tsx similarity index 97% rename from src/common/components/decks/columns/add-column/deck-add-column-search-box.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-search-box.tsx index 758a58d69fe..3d01d5daa3c 100644 --- a/src/common/components/decks/columns/add-column/deck-add-column-search-box.tsx +++ b/src/common/features/decks/columns/add-column/deck-add-column-search-box.tsx @@ -1,10 +1,10 @@ import React, { useEffect, useState } from "react"; import { lookupAccounts } from "../../../../api/hive"; -import { error } from "../../../feedback"; +import { error } from "../../../../components/feedback"; import { formatError } from "../../../../api/operations"; import { useMappedStore } from "../../../../store/use-mapped-store"; import useDebounce from "react-use/lib/useDebounce"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { getCommunities } from "../../../../api/bridge"; import { UsernameDataItem } from "./common"; import { closeSvg } from "../../../../img/svg"; diff --git a/src/common/components/decks/columns/add-column/deck-add-column-search-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-search-settings.tsx similarity index 100% rename from src/common/components/decks/columns/add-column/deck-add-column-search-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-search-settings.tsx diff --git a/src/common/components/decks/columns/add-column/deck-add-column-thread-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-thread-settings.tsx similarity index 97% rename from src/common/components/decks/columns/add-column/deck-add-column-thread-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-thread-settings.tsx index eadec7c9283..5e003c2b181 100644 --- a/src/common/components/decks/columns/add-column/deck-add-column-thread-settings.tsx +++ b/src/common/features/decks/columns/add-column/deck-add-column-thread-settings.tsx @@ -1,5 +1,5 @@ import { _t } from "../../../../i18n"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import React, { useContext, useState } from "react"; import { useMappedStore } from "../../../../store/use-mapped-store"; import useLocalStorage from "react-use/lib/useLocalStorage"; diff --git a/src/common/components/decks/columns/add-column/deck-add-column-type-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-type-settings.tsx similarity index 100% rename from src/common/components/decks/columns/add-column/deck-add-column-type-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-type-settings.tsx diff --git a/src/common/components/decks/columns/add-column/deck-add-column-user-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-user-settings.tsx similarity index 97% rename from src/common/components/decks/columns/add-column/deck-add-column-user-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-user-settings.tsx index b121ca8c9c7..49d2c89bdd5 100644 --- a/src/common/components/decks/columns/add-column/deck-add-column-user-settings.tsx +++ b/src/common/features/decks/columns/add-column/deck-add-column-user-settings.tsx @@ -1,7 +1,7 @@ import { useMappedStore } from "../../../../store/use-mapped-store"; import React, { useContext, useState } from "react"; import { DeckGridContext } from "../../deck-manager"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { DeckAddColumnSearchBox } from "./deck-add-column-search-box"; import { SettingsProps, UsernameDataItem } from "./common"; import { ICONS, USER_CONTENT_TYPES } from "../../consts"; diff --git a/src/common/components/decks/columns/add-column/deck-add-column-wallet-settings.tsx b/src/common/features/decks/columns/add-column/deck-add-column-wallet-settings.tsx similarity index 97% rename from src/common/components/decks/columns/add-column/deck-add-column-wallet-settings.tsx rename to src/common/features/decks/columns/add-column/deck-add-column-wallet-settings.tsx index a9fcdc80cf8..718a2f4e410 100644 --- a/src/common/components/decks/columns/add-column/deck-add-column-wallet-settings.tsx +++ b/src/common/features/decks/columns/add-column/deck-add-column-wallet-settings.tsx @@ -1,7 +1,7 @@ import { useMappedStore } from "../../../../store/use-mapped-store"; import React, { useContext, useState } from "react"; import { DeckGridContext } from "../../deck-manager"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { DeckAddColumnSearchBox } from "./deck-add-column-search-box"; import { SettingsProps, UsernameDataItem } from "./common"; import { ICONS, WALLET_CONTENT_TYPES } from "../../consts"; diff --git a/src/common/components/decks/columns/add-column/deck-add-column.tsx b/src/common/features/decks/columns/add-column/deck-add-column.tsx similarity index 100% rename from src/common/components/decks/columns/add-column/deck-add-column.tsx rename to src/common/features/decks/columns/add-column/deck-add-column.tsx diff --git a/src/common/components/decks/columns/add-column/index.ts b/src/common/features/decks/columns/add-column/index.ts similarity index 100% rename from src/common/components/decks/columns/add-column/index.ts rename to src/common/features/decks/columns/add-column/index.ts diff --git a/src/common/components/decks/columns/content-viewer/_deck-post-viewer.scss b/src/common/features/decks/columns/content-viewer/_deck-post-viewer.scss similarity index 100% rename from src/common/components/decks/columns/content-viewer/_deck-post-viewer.scss rename to src/common/features/decks/columns/content-viewer/_deck-post-viewer.scss diff --git a/src/common/components/decks/columns/content-viewer/_deck-thread-item-viewer-reply.scss b/src/common/features/decks/columns/content-viewer/_deck-thread-item-viewer-reply.scss similarity index 100% rename from src/common/components/decks/columns/content-viewer/_deck-thread-item-viewer-reply.scss rename to src/common/features/decks/columns/content-viewer/_deck-thread-item-viewer-reply.scss diff --git a/src/common/components/decks/columns/content-viewer/deck-post-viewer-comment-box.tsx b/src/common/features/decks/columns/content-viewer/deck-post-viewer-comment-box.tsx similarity index 97% rename from src/common/components/decks/columns/content-viewer/deck-post-viewer-comment-box.tsx rename to src/common/features/decks/columns/content-viewer/deck-post-viewer-comment-box.tsx index 9f30fabb99c..7412d36bbee 100644 --- a/src/common/components/decks/columns/content-viewer/deck-post-viewer-comment-box.tsx +++ b/src/common/features/decks/columns/content-viewer/deck-post-viewer-comment-box.tsx @@ -1,4 +1,4 @@ -import Comment from "../../../comment"; +import Comment from "../../../../components/comment"; import { useMappedStore } from "../../../../store/use-mapped-store"; import React, { useState } from "react"; import { _t } from "../../../../i18n"; diff --git a/src/common/components/decks/columns/content-viewer/deck-post-viewer.tsx b/src/common/features/decks/columns/content-viewer/deck-post-viewer.tsx similarity index 93% rename from src/common/components/decks/columns/content-viewer/deck-post-viewer.tsx rename to src/common/features/decks/columns/content-viewer/deck-post-viewer.tsx index eeff2e2ecba..188c5508795 100644 --- a/src/common/components/decks/columns/content-viewer/deck-post-viewer.tsx +++ b/src/common/features/decks/columns/content-viewer/deck-post-viewer.tsx @@ -4,16 +4,16 @@ import "./_deck-post-viewer.scss"; import useMount from "react-use/lib/useMount"; import { arrowLeftSvg } from "../../../../img/svg"; import { renderPostBody } from "@ecency/render-helper"; -import { EntryInfo } from "../../../entry-info"; +import { EntryInfo } from "../../../../components/entry-info"; import { History } from "history"; -import { Discussion } from "../../../discussion"; +import { Discussion } from "../../../../components/discussion"; import { useMappedStore } from "../../../../store/use-mapped-store"; import { DeckPostViewerCommentBox } from "./deck-post-viewer-comment-box"; import { _t } from "../../../../i18n"; import { commentSvg, voteSvg } from "../../icons"; -import EntryVoteBtn from "../../../entry-vote-btn"; +import EntryVoteBtn from "../../../../components/entry-vote-btn"; import { EntriesCacheContext, useEntryCache } from "../../../../core"; -import EntryVotes from "../../../entry-votes"; +import EntryVotes from "../../../../components/entry-votes"; import { useResizeDetector } from "react-resize-detector"; import { renderAuthors, diff --git a/src/common/components/decks/columns/content-viewer/deck-thread-item-viewer-reply.tsx b/src/common/features/decks/columns/content-viewer/deck-thread-item-viewer-reply.tsx similarity index 100% rename from src/common/components/decks/columns/content-viewer/deck-thread-item-viewer-reply.tsx rename to src/common/features/decks/columns/content-viewer/deck-thread-item-viewer-reply.tsx diff --git a/src/common/components/decks/columns/content-viewer/deck-thread-item-viewer.tsx b/src/common/features/decks/columns/content-viewer/deck-thread-item-viewer.tsx similarity index 100% rename from src/common/components/decks/columns/content-viewer/deck-thread-item-viewer.tsx rename to src/common/features/decks/columns/content-viewer/deck-thread-item-viewer.tsx diff --git a/src/common/components/decks/columns/content-viewer/deck-topics-content-viewer.tsx b/src/common/features/decks/columns/content-viewer/deck-topics-content-viewer.tsx similarity index 97% rename from src/common/components/decks/columns/content-viewer/deck-topics-content-viewer.tsx rename to src/common/features/decks/columns/content-viewer/deck-topics-content-viewer.tsx index a4e596de27c..1f0c52d17db 100644 --- a/src/common/components/decks/columns/content-viewer/deck-topics-content-viewer.tsx +++ b/src/common/features/decks/columns/content-viewer/deck-topics-content-viewer.tsx @@ -4,7 +4,7 @@ import { arrowLeftSvg } from "../../../../img/svg"; import { Entry } from "../../../../store/entries/types"; import { getPostsRanked } from "../../../../api/bridge"; import { ListItemSkeleton, SearchListItem } from "../deck-items"; -import { makePath } from "../../../entry-link"; +import { makePath } from "../../../../components/entry-link"; import { Button } from "@ui/button"; interface Props { diff --git a/src/common/components/decks/columns/content-viewer/index.ts b/src/common/features/decks/columns/content-viewer/index.ts similarity index 100% rename from src/common/components/decks/columns/content-viewer/index.ts rename to src/common/features/decks/columns/content-viewer/index.ts diff --git a/src/common/components/decks/columns/deck-column-settings/_deck-search-column-settings.scss b/src/common/features/decks/columns/deck-column-settings/_deck-search-column-settings.scss similarity index 100% rename from src/common/components/decks/columns/deck-column-settings/_deck-search-column-settings.scss rename to src/common/features/decks/columns/deck-column-settings/_deck-search-column-settings.scss diff --git a/src/common/components/decks/columns/deck-column-settings/deck-content-type-column-settings.tsx b/src/common/features/decks/columns/deck-column-settings/deck-content-type-column-settings.tsx similarity index 100% rename from src/common/components/decks/columns/deck-column-settings/deck-content-type-column-settings.tsx rename to src/common/features/decks/columns/deck-column-settings/deck-content-type-column-settings.tsx diff --git a/src/common/components/decks/columns/deck-column-settings/deck-search-column-settings.tsx b/src/common/features/decks/columns/deck-column-settings/deck-search-column-settings.tsx similarity index 100% rename from src/common/components/decks/columns/deck-column-settings/deck-search-column-settings.tsx rename to src/common/features/decks/columns/deck-column-settings/deck-search-column-settings.tsx diff --git a/src/common/components/decks/columns/deck-community-column.tsx b/src/common/features/decks/columns/deck-community-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-community-column.tsx rename to src/common/features/decks/columns/deck-community-column.tsx diff --git a/src/common/components/decks/columns/deck-faq-column.tsx b/src/common/features/decks/columns/deck-faq-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-faq-column.tsx rename to src/common/features/decks/columns/deck-faq-column.tsx diff --git a/src/common/components/decks/columns/deck-items/_index.scss b/src/common/features/decks/columns/deck-items/_index.scss similarity index 100% rename from src/common/components/decks/columns/deck-items/_index.scss rename to src/common/features/decks/columns/deck-items/_index.scss diff --git a/src/common/components/decks/columns/deck-items/deck-hot-list-item.tsx b/src/common/features/decks/columns/deck-items/deck-hot-list-item.tsx similarity index 100% rename from src/common/components/decks/columns/deck-items/deck-hot-list-item.tsx rename to src/common/features/decks/columns/deck-items/deck-hot-list-item.tsx diff --git a/src/common/components/decks/columns/deck-items/deck-search-list-item.tsx b/src/common/features/decks/columns/deck-items/deck-search-list-item.tsx similarity index 94% rename from src/common/components/decks/columns/deck-items/deck-search-list-item.tsx rename to src/common/features/decks/columns/deck-items/deck-search-list-item.tsx index 778952bbabf..b6bc631d944 100644 --- a/src/common/components/decks/columns/deck-items/deck-search-list-item.tsx +++ b/src/common/features/decks/columns/deck-items/deck-search-list-item.tsx @@ -1,20 +1,20 @@ import { useMappedStore } from "../../../../store/use-mapped-store"; import React, { Fragment, useContext, useEffect, useRef, useState } from "react"; -import profileLink from "../../../profile-link"; +import profileLink from "../../../../components/profile-link"; import { history } from "../../../../store"; import { dateToRelative } from "../../../../helper/parse-date"; import { Link } from "react-router-dom"; import { _t } from "../../../../i18n"; -import Tooltip from "../../../tooltip"; +import Tooltip from "../../../../components/tooltip"; import { pinSvg } from "../../../../img/svg"; import { catchPostImage, postBodySummary, proxifyImageSrc } from "@ecency/render-helper"; -import EntryVoteBtn from "../../../entry-vote-btn"; -import EntryPayout from "../../../entry-payout"; -import EntryVotes from "../../../entry-votes"; -import EntryReblogBtn from "../../../entry-reblog-btn"; -import EntryMenu from "../../../entry-menu"; +import EntryVoteBtn from "../../../../components/entry-vote-btn"; +import EntryPayout from "../../../../components/entry-payout"; +import EntryVotes from "../../../../components/entry-votes"; +import EntryReblogBtn from "../../../../components/entry-reblog-btn"; +import EntryMenu from "../../../../components/entry-menu"; import { transformMarkedContent } from "../../../../util/transform-marked-content"; -import { EntryLink } from "../../../entry-link"; +import { EntryLink } from "../../../../components/entry-link"; import { useInViewport } from "react-in-viewport"; import { commentSvg, voteSvg } from "../../icons"; import { EntriesCacheContext, useEntryCache } from "../../../../core"; diff --git a/src/common/components/decks/columns/deck-items/deck-skeleton-items.tsx b/src/common/features/decks/columns/deck-items/deck-skeleton-items.tsx similarity index 100% rename from src/common/components/decks/columns/deck-items/deck-skeleton-items.tsx rename to src/common/features/decks/columns/deck-items/deck-skeleton-items.tsx diff --git a/src/common/components/decks/columns/deck-items/deck-thread-edit-item.tsx b/src/common/features/decks/columns/deck-items/deck-thread-edit-item.tsx similarity index 100% rename from src/common/components/decks/columns/deck-items/deck-thread-edit-item.tsx rename to src/common/features/decks/columns/deck-items/deck-thread-edit-item.tsx diff --git a/src/common/components/decks/columns/deck-items/deck-thread-item-body-render-helper.tsx b/src/common/features/decks/columns/deck-items/deck-thread-item-body-render-helper.tsx similarity index 97% rename from src/common/components/decks/columns/deck-items/deck-thread-item-body-render-helper.tsx rename to src/common/features/decks/columns/deck-items/deck-thread-item-body-render-helper.tsx index eacc7a16c21..d4515e145ca 100644 --- a/src/common/components/decks/columns/deck-items/deck-thread-item-body-render-helper.tsx +++ b/src/common/features/decks/columns/deck-items/deck-thread-item-body-render-helper.tsx @@ -1,9 +1,9 @@ import React, { MutableRefObject } from "react"; import ReactDOM from "react-dom"; -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { Global } from "../../../../store/global/types"; import { DeckThreadLinkItem } from "./deck-thread-link-item"; -import { getCGMarketApi } from "../../../market-swap-form/api/coingecko-api"; +import { getCGMarketApi } from "../../../../components/market-swap-form/api/coingecko-api"; import { renderToString } from "react-dom/server"; import { _t } from "../../../../i18n"; import formattedNumber from "../../../../util/formatted-number"; diff --git a/src/common/components/decks/columns/deck-items/deck-thread-item-body.tsx b/src/common/features/decks/columns/deck-items/deck-thread-item-body.tsx similarity index 85% rename from src/common/components/decks/columns/deck-items/deck-thread-item-body.tsx rename to src/common/features/decks/columns/deck-items/deck-thread-item-body.tsx index 51cd546f580..77682d44088 100644 --- a/src/common/components/decks/columns/deck-items/deck-thread-item-body.tsx +++ b/src/common/features/decks/columns/deck-items/deck-thread-item-body.tsx @@ -1,5 +1,5 @@ import { createPortal } from "react-dom"; -import React, { useEffect, useRef, useState } from "react"; +import React, { useCallback, useEffect, useRef, useState } from "react"; import { useMappedStore } from "../../../../store/use-mapped-store"; import { renderPostBody } from "@ecency/render-helper"; import { IdentifiableEntry } from "../deck-threads-manager"; @@ -14,6 +14,7 @@ import { renderTweets, renderVideos } from "./deck-thread-item-body-render-helper"; +import { renderLiketu } from "../helpers"; interface Props { entry: IdentifiableEntry; @@ -50,7 +51,7 @@ export const DeckThreadItemBody = ({ if (!renderInitiated) { renderBody(); } - }, [height]); + }, [height, entry]); const renderBody = async () => { setRenderInitiated(true); @@ -59,6 +60,10 @@ export const DeckThreadItemBody = ({ renderAreaRef.current.innerHTML = await renderCurrencies(renderAreaRef?.current?.innerHTML); } + if (entry.parent_author === "liketu.moments") { + return; + } + renderTags(renderAreaRef); renderAuthors(renderAreaRef, global); renderPostLinks(renderAreaRef); @@ -71,12 +76,20 @@ export const DeckThreadItemBody = ({ renderTweets(renderAreaRef); }; + const renderContentBody = useCallback(() => { + if (entry.parent_author === "liketu.moments") { + return renderLiketu(entry); + } + + return renderPostBody(entry, true, global.canUseWebp); + }, [entry, global.canUseWebp]); + return (
{currentViewingImage && createPortal( diff --git a/src/common/components/decks/columns/deck-items/deck-thread-item-header.tsx b/src/common/features/decks/columns/deck-items/deck-thread-item-header.tsx similarity index 96% rename from src/common/components/decks/columns/deck-items/deck-thread-item-header.tsx rename to src/common/features/decks/columns/deck-items/deck-thread-item-header.tsx index fd755d63c67..8f8a135ff4f 100644 --- a/src/common/components/decks/columns/deck-items/deck-thread-item-header.tsx +++ b/src/common/features/decks/columns/deck-items/deck-thread-item-header.tsx @@ -1,4 +1,4 @@ -import { UserAvatar } from "../../../user-avatar"; +import { UserAvatar } from "../../../../components/user-avatar"; import { Link } from "react-router-dom"; import { _t } from "../../../../i18n"; import { dateToRelative } from "../../../../helper/parse-date"; diff --git a/src/common/components/decks/columns/deck-items/deck-thread-item.tsx b/src/common/features/decks/columns/deck-items/deck-thread-item.tsx similarity index 95% rename from src/common/components/decks/columns/deck-items/deck-thread-item.tsx rename to src/common/features/decks/columns/deck-items/deck-thread-item.tsx index da503fd1ea5..9e1000ac94d 100644 --- a/src/common/components/decks/columns/deck-items/deck-thread-item.tsx +++ b/src/common/features/decks/columns/deck-items/deck-thread-item.tsx @@ -1,13 +1,13 @@ import { useMappedStore } from "../../../../store/use-mapped-store"; import { useResizeDetector } from "react-resize-detector"; import React, { useContext, useEffect, useState } from "react"; -import { UserAvatar } from "../../../user-avatar"; -import EntryVoteBtn from "../../../entry-vote-btn"; +import { UserAvatar } from "../../../../components/user-avatar"; +import EntryVoteBtn from "../../../../components/entry-vote-btn"; import { History } from "history"; import { _t } from "../../../../i18n"; import { IdentifiableEntry } from "../deck-threads-manager"; import { commentSvg, voteSvg } from "../../icons"; -import EntryVotes from "../../../entry-votes"; +import EntryVotes from "../../../../components/entry-votes"; import { DeckThreadItemBody } from "./deck-thread-item-body"; import { classNameObject } from "../../../../helper/class-name-object"; import { useInViewport } from "react-in-viewport"; @@ -16,7 +16,7 @@ import { useEntryChecking } from "../../utils"; import { Entry } from "../../../../store/entries/types"; import { DeckThreadItemHeader } from "./deck-thread-item-header"; import { dateToRelative } from "../../../../helper/parse-date"; -import EntryMenu from "../../../entry-menu"; +import EntryMenu from "../../../../components/entry-menu"; import { Button } from "@ui/button"; export interface ThreadItemProps { diff --git a/src/common/components/decks/columns/deck-items/deck-thread-link-item-cache.ts b/src/common/features/decks/columns/deck-items/deck-thread-link-item-cache.ts similarity index 100% rename from src/common/components/decks/columns/deck-items/deck-thread-link-item-cache.ts rename to src/common/features/decks/columns/deck-items/deck-thread-link-item-cache.ts diff --git a/src/common/components/decks/columns/deck-items/deck-thread-link-item.tsx b/src/common/features/decks/columns/deck-items/deck-thread-link-item.tsx similarity index 100% rename from src/common/components/decks/columns/deck-items/deck-thread-link-item.tsx rename to src/common/features/decks/columns/deck-items/deck-thread-link-item.tsx diff --git a/src/common/components/decks/columns/deck-items/index.ts b/src/common/features/decks/columns/deck-items/index.ts similarity index 100% rename from src/common/components/decks/columns/deck-items/index.ts rename to src/common/features/decks/columns/deck-items/index.ts diff --git a/src/common/components/decks/columns/deck-login-overlay-placeholder.tsx b/src/common/features/decks/columns/deck-login-overlay-placeholder.tsx similarity index 100% rename from src/common/components/decks/columns/deck-login-overlay-placeholder.tsx rename to src/common/features/decks/columns/deck-login-overlay-placeholder.tsx diff --git a/src/common/components/decks/columns/deck-msf-column.tsx b/src/common/features/decks/columns/deck-msf-column.tsx similarity index 91% rename from src/common/components/decks/columns/deck-msf-column.tsx rename to src/common/features/decks/columns/deck-msf-column.tsx index f65798300a4..727c28a40d6 100644 --- a/src/common/components/decks/columns/deck-msf-column.tsx +++ b/src/common/features/decks/columns/deck-msf-column.tsx @@ -2,7 +2,7 @@ import React from "react"; import { GenericDeckColumn } from "./generic-deck-column"; import { DraggableProvidedDragHandleProps } from "react-beautiful-dnd"; import { _t } from "../../../i18n"; -import { SwapMode } from "../../market-swap-form/swap-mode"; +import { SwapMode } from "../../../components/market-swap-form/swap-mode"; interface Props { id: string; diff --git a/src/common/components/decks/columns/deck-notifications-column.tsx b/src/common/features/decks/columns/deck-notifications-column.tsx similarity index 98% rename from src/common/components/decks/columns/deck-notifications-column.tsx rename to src/common/features/decks/columns/deck-notifications-column.tsx index 589699ac0bb..9b789c6a1dc 100644 --- a/src/common/components/decks/columns/deck-notifications-column.tsx +++ b/src/common/features/decks/columns/deck-notifications-column.tsx @@ -3,7 +3,6 @@ import { ShortListItemSkeleton } from "./deck-items"; import { GenericDeckWithDataColumn } from "./generic-deck-with-data-column"; import { UserDeckGridItem } from "../types"; import { DraggableProvidedDragHandleProps } from "react-beautiful-dnd"; -import NotificationListItem from "../../notifications/notification-list-item"; import { ApiNotification, NotificationFilter } from "../../../store/notifications/types"; import { useMappedStore } from "../../../store/use-mapped-store"; import { History } from "history"; @@ -19,6 +18,7 @@ import { DeckContentTypeColumnSettings } from "./deck-column-settings/deck-conte import { _t } from "../../../i18n"; import { InfiniteScrollLoader } from "./helpers"; import { newDataComingPaginatedCondition } from "../utils"; +import NotificationListItem from "../../../components/notifications/notification-list-item"; interface Props { id: string; diff --git a/src/common/components/decks/columns/deck-search-column.tsx b/src/common/features/decks/columns/deck-search-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-search-column.tsx rename to src/common/features/decks/columns/deck-search-column.tsx diff --git a/src/common/components/decks/columns/deck-threads-column.tsx b/src/common/features/decks/columns/deck-threads-column.tsx similarity index 98% rename from src/common/components/decks/columns/deck-threads-column.tsx rename to src/common/features/decks/columns/deck-threads-column.tsx index 5bb106d5bbd..dccec9dc824 100644 --- a/src/common/components/decks/columns/deck-threads-column.tsx +++ b/src/common/features/decks/columns/deck-threads-column.tsx @@ -161,7 +161,7 @@ const DeckThreadsColumnComponent = ({ id, settings, history, draggable }: Props) data={data} newDataComingCondition={(newData) => newDataComingPaginatedCondition(newData, prevData)} isReloading={isReloading} - isVirtualScroll={false} + isVirtualScroll={["ecency.waves", "liketu.moments"].includes(settings.host)} isExpanded={!!currentViewingEntry} isFirstLoaded={isFirstLoaded} onReload={() => fetchData()} diff --git a/src/common/components/decks/columns/deck-threads-manager/community-api.ts b/src/common/features/decks/columns/deck-threads-manager/community-api.ts similarity index 100% rename from src/common/components/decks/columns/deck-threads-manager/community-api.ts rename to src/common/features/decks/columns/deck-threads-manager/community-api.ts diff --git a/src/common/components/decks/columns/deck-threads-manager/deck-threads-column-manager.tsx b/src/common/features/decks/columns/deck-threads-manager/deck-threads-column-manager.tsx similarity index 100% rename from src/common/components/decks/columns/deck-threads-manager/deck-threads-column-manager.tsx rename to src/common/features/decks/columns/deck-threads-manager/deck-threads-column-manager.tsx diff --git a/src/common/components/decks/columns/deck-threads-manager/identifiable-entry.ts b/src/common/features/decks/columns/deck-threads-manager/identifiable-entry.ts similarity index 100% rename from src/common/components/decks/columns/deck-threads-manager/identifiable-entry.ts rename to src/common/features/decks/columns/deck-threads-manager/identifiable-entry.ts diff --git a/src/common/components/decks/columns/deck-threads-manager/index.tsx b/src/common/features/decks/columns/deck-threads-manager/index.tsx similarity index 100% rename from src/common/components/decks/columns/deck-threads-manager/index.tsx rename to src/common/features/decks/columns/deck-threads-manager/index.tsx diff --git a/src/common/components/decks/columns/deck-threads-manager/threads-api.ts b/src/common/features/decks/columns/deck-threads-manager/threads-api.ts similarity index 100% rename from src/common/components/decks/columns/deck-threads-manager/threads-api.ts rename to src/common/features/decks/columns/deck-threads-manager/threads-api.ts diff --git a/src/common/components/decks/columns/deck-topics-column.tsx b/src/common/features/decks/columns/deck-topics-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-topics-column.tsx rename to src/common/features/decks/columns/deck-topics-column.tsx diff --git a/src/common/components/decks/columns/deck-trending-column.tsx b/src/common/features/decks/columns/deck-trending-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-trending-column.tsx rename to src/common/features/decks/columns/deck-trending-column.tsx diff --git a/src/common/components/decks/columns/deck-user-column.tsx b/src/common/features/decks/columns/deck-user-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-user-column.tsx rename to src/common/features/decks/columns/deck-user-column.tsx diff --git a/src/common/components/decks/columns/deck-wallet-balance-column.tsx b/src/common/features/decks/columns/deck-wallet-balance-column.tsx similarity index 98% rename from src/common/components/decks/columns/deck-wallet-balance-column.tsx rename to src/common/features/decks/columns/deck-wallet-balance-column.tsx index f21d81a1e47..29b74ae546d 100644 --- a/src/common/components/decks/columns/deck-wallet-balance-column.tsx +++ b/src/common/features/decks/columns/deck-wallet-balance-column.tsx @@ -6,7 +6,6 @@ import { History } from "history"; import { UserDeckGridItem } from "../types"; import "./_deck-wallet-balance-column.scss"; import { getCurrencyTokenRate } from "../../../api/private-api"; -import FormattedCurrency from "../../formatted-currency"; import { useMappedStore } from "../../../store/use-mapped-store"; import { getAccount, getConversionRequests } from "../../../api/hive"; import parseAsset from "../../../helper/parse-asset"; @@ -16,10 +15,11 @@ import formattedNumber from "../../../util/formatted-number"; import { vestsToHp } from "../../../helper/vesting"; import { getHiveEngineTokenBalances, getMetrics } from "../../../api/hive-engine"; import { getSpkWallet } from "../../../api/spk-api"; -import { getEstimatedBalance } from "../../wallet-spk/util"; import { DeckGridContext } from "../deck-manager"; import { usePointsQuery } from "../../../api/queries"; import { Spinner } from "@ui/spinner"; +import { getEstimatedBalance } from "../../../components/wallet-spk/util"; +import FormattedCurrency from "../../../components/formatted-currency"; interface Props { id: string; diff --git a/src/common/components/decks/columns/deck-wallet-column.tsx b/src/common/features/decks/columns/deck-wallet-column.tsx similarity index 97% rename from src/common/components/decks/columns/deck-wallet-column.tsx rename to src/common/features/decks/columns/deck-wallet-column.tsx index 65ccb64d897..c6f5ab82768 100644 --- a/src/common/components/decks/columns/deck-wallet-column.tsx +++ b/src/common/features/decks/columns/deck-wallet-column.tsx @@ -3,7 +3,6 @@ import { UserDeckGridItem } from "../types"; import { DraggableProvidedDragHandleProps } from "react-beautiful-dnd"; import { GenericDeckWithDataColumn } from "./generic-deck-with-data-column"; import { fetchTransactions } from "../../../store/transactions/fetchTransactions"; -import { TransactionRow } from "../../transactions"; import { Transaction } from "../../../store/transactions/types"; import { useMappedStore } from "../../../store/use-mapped-store"; import { History } from "history"; @@ -13,6 +12,7 @@ import usePrevious from "react-use/lib/usePrevious"; import { DeckContentTypeColumnSettings } from "./deck-column-settings/deck-content-type-column-settings"; import { WALLET_CONTENT_TYPES } from "../consts"; import { _t } from "../../../i18n"; +import { TransactionRow } from "../../../components/transactions"; interface Props { id: string; diff --git a/src/common/components/decks/columns/deck-whats-new-column.tsx b/src/common/features/decks/columns/deck-whats-new-column.tsx similarity index 100% rename from src/common/components/decks/columns/deck-whats-new-column.tsx rename to src/common/features/decks/columns/deck-whats-new-column.tsx diff --git a/src/common/components/decks/columns/generic-deck-column.tsx b/src/common/features/decks/columns/generic-deck-column.tsx similarity index 100% rename from src/common/components/decks/columns/generic-deck-column.tsx rename to src/common/features/decks/columns/generic-deck-column.tsx diff --git a/src/common/components/decks/columns/generic-deck-with-data-column.tsx b/src/common/features/decks/columns/generic-deck-with-data-column.tsx similarity index 99% rename from src/common/components/decks/columns/generic-deck-with-data-column.tsx rename to src/common/features/decks/columns/generic-deck-with-data-column.tsx index f9a24d92e5f..14e1b69c3d4 100644 --- a/src/common/components/decks/columns/generic-deck-with-data-column.tsx +++ b/src/common/features/decks/columns/generic-deck-with-data-column.tsx @@ -65,7 +65,7 @@ export const GenericDeckWithDataColumn = ({ {({ height, width }) => ( +
+ ${images.map( + (image) => `` + )} +
+ ${text ? `
${text}` : ""} +
`; + + return shadow.innerHTML; +} diff --git a/src/common/components/decks/columns/index.ts b/src/common/features/decks/columns/index.ts similarity index 100% rename from src/common/components/decks/columns/index.ts rename to src/common/features/decks/columns/index.ts diff --git a/src/common/components/decks/consts/available-thread-hosts.ts b/src/common/features/decks/consts/available-thread-hosts.ts similarity index 100% rename from src/common/components/decks/consts/available-thread-hosts.ts rename to src/common/features/decks/consts/available-thread-hosts.ts diff --git a/src/common/components/decks/consts/column-icons.ts b/src/common/features/decks/consts/column-icons.ts similarity index 100% rename from src/common/components/decks/consts/column-icons.ts rename to src/common/features/decks/consts/column-icons.ts diff --git a/src/common/components/decks/consts/column-titles.ts b/src/common/features/decks/consts/column-titles.ts similarity index 100% rename from src/common/components/decks/consts/column-titles.ts rename to src/common/features/decks/consts/column-titles.ts diff --git a/src/common/components/decks/consts/content-types.ts b/src/common/features/decks/consts/content-types.ts similarity index 100% rename from src/common/components/decks/consts/content-types.ts rename to src/common/features/decks/consts/content-types.ts diff --git a/src/common/components/decks/consts/deck-search-column.tsx b/src/common/features/decks/consts/deck-search-column.tsx similarity index 100% rename from src/common/components/decks/consts/deck-search-column.tsx rename to src/common/features/decks/consts/deck-search-column.tsx diff --git a/src/common/components/decks/consts/default-layout.const.ts b/src/common/features/decks/consts/default-layout.const.ts similarity index 100% rename from src/common/components/decks/consts/default-layout.const.ts rename to src/common/features/decks/consts/default-layout.const.ts diff --git a/src/common/components/decks/consts/index.ts b/src/common/features/decks/consts/index.ts similarity index 100% rename from src/common/components/decks/consts/index.ts rename to src/common/features/decks/consts/index.ts diff --git a/src/common/components/decks/deck-api.ts b/src/common/features/decks/deck-api.ts similarity index 100% rename from src/common/components/decks/deck-api.ts rename to src/common/features/decks/deck-api.ts diff --git a/src/common/components/decks/deck-floating-manager.tsx b/src/common/features/decks/deck-floating-manager.tsx similarity index 100% rename from src/common/components/decks/deck-floating-manager.tsx rename to src/common/features/decks/deck-floating-manager.tsx diff --git a/src/common/components/decks/deck-grid.tsx b/src/common/features/decks/deck-grid.tsx similarity index 100% rename from src/common/components/decks/deck-grid.tsx rename to src/common/features/decks/deck-grid.tsx diff --git a/src/common/components/decks/deck-loader.tsx b/src/common/features/decks/deck-loader.tsx similarity index 100% rename from src/common/components/decks/deck-loader.tsx rename to src/common/features/decks/deck-loader.tsx diff --git a/src/common/components/decks/deck-manager.tsx b/src/common/features/decks/deck-manager.tsx similarity index 98% rename from src/common/components/decks/deck-manager.tsx rename to src/common/features/decks/deck-manager.tsx index 93e71a8e6c4..9741e584f46 100644 --- a/src/common/components/decks/deck-manager.tsx +++ b/src/common/features/decks/deck-manager.tsx @@ -7,7 +7,7 @@ import { PREFIX } from "../../util/local-storage"; import { createDeck, deleteDeck, getDecks, updateDeck } from "./deck-api"; import { useMappedStore } from "../../store/use-mapped-store"; import usePrevious from "react-use/lib/usePrevious"; -import { error } from "../feedback"; +import { error } from "../../components/feedback"; import { _t } from "../../i18n"; interface Context { @@ -69,7 +69,9 @@ export const DeckManager = ({ children }: Props) => { const [layout, setLayout] = useState(decks.decks[0]); const previousLayout = usePrevious(layout); - const [scrollHandler, setScrollHandler] = useState({ handle: (key: number) => {} }); + const [scrollHandler, setScrollHandler] = useState({ + handle: (key: number) => {} + }); useEffect(() => { if (persistedActiveDeck && decks.decks.find((d) => d.key === persistedActiveDeck)) { diff --git a/src/common/components/decks/deck-settings/_decks-settings.scss b/src/common/features/decks/deck-settings/_decks-settings.scss similarity index 100% rename from src/common/components/decks/deck-settings/_decks-settings.scss rename to src/common/features/decks/deck-settings/_decks-settings.scss diff --git a/src/common/components/decks/deck-settings/decks-settings.tsx b/src/common/features/decks/deck-settings/decks-settings.tsx similarity index 97% rename from src/common/components/decks/deck-settings/decks-settings.tsx rename to src/common/features/decks/deck-settings/decks-settings.tsx index dc6024cc393..d1b8aeadfd6 100644 --- a/src/common/components/decks/deck-settings/decks-settings.tsx +++ b/src/common/features/decks/deck-settings/decks-settings.tsx @@ -1,9 +1,9 @@ import React, { useContext, useEffect, useState } from "react"; import "./_decks-settings.scss"; import { DeckGrid } from "../types"; -import EmojiPicker from "../../emoji-picker/index-old"; +import EmojiPicker from "../../../components/emoji-picker/index-old"; import { deleteForeverSvg, emoticonHappyOutlineSvg } from "../../../img/svg"; -import ClickAwayListener from "../../clickaway-listener"; +import ClickAwayListener from "../../../components/clickaway-listener"; import * as uuid from "uuid"; import { DeckGridContext } from "../deck-manager"; import { DEFAULT_COLUMNS } from "../consts"; diff --git a/src/common/components/decks/deck-smooth-scroller.tsx b/src/common/features/decks/deck-smooth-scroller.tsx similarity index 100% rename from src/common/components/decks/deck-smooth-scroller.tsx rename to src/common/features/decks/deck-smooth-scroller.tsx diff --git a/src/common/components/decks/deck-threads-form/_index.scss b/src/common/features/decks/deck-threads-form/_index.scss similarity index 100% rename from src/common/components/decks/deck-threads-form/_index.scss rename to src/common/features/decks/deck-threads-form/_index.scss diff --git a/src/common/components/decks/deck-threads-form/api/index.ts b/src/common/features/decks/deck-threads-form/api/index.ts similarity index 100% rename from src/common/components/decks/deck-threads-form/api/index.ts rename to src/common/features/decks/deck-threads-form/api/index.ts diff --git a/src/common/components/decks/deck-threads-form/api/threads-api.ts b/src/common/features/decks/deck-threads-form/api/threads-api.ts similarity index 100% rename from src/common/components/decks/deck-threads-form/api/threads-api.ts rename to src/common/features/decks/deck-threads-form/api/threads-api.ts diff --git a/src/common/components/decks/deck-threads-form/api/use-community-api.ts b/src/common/features/decks/deck-threads-form/api/use-community-api.ts similarity index 100% rename from src/common/components/decks/deck-threads-form/api/use-community-api.ts rename to src/common/features/decks/deck-threads-form/api/use-community-api.ts diff --git a/src/common/components/decks/deck-threads-form/deck-threads-created-recently.tsx b/src/common/features/decks/deck-threads-form/deck-threads-created-recently.tsx similarity index 97% rename from src/common/components/decks/deck-threads-form/deck-threads-created-recently.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-created-recently.tsx index 6fbfa6a3894..a4cf0d77117 100644 --- a/src/common/components/decks/deck-threads-form/deck-threads-created-recently.tsx +++ b/src/common/features/decks/deck-threads-form/deck-threads-created-recently.tsx @@ -1,7 +1,7 @@ import React, { useContext, useEffect, useState } from "react"; import { Entry } from "../../../store/entries/types"; import { _t } from "../../../i18n"; -import { EntryLink } from "../../entry-link"; +import { EntryLink } from "../../../components/entry-link"; import { checkSvg } from "../../../img/svg"; import { DeckThreadsContext } from "../columns/deck-threads-manager"; import { useEntryChecking } from "../utils"; diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-control.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-control.tsx similarity index 100% rename from src/common/components/decks/deck-threads-form/deck-threads-form-control.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-control.tsx diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-emoji-picker.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-emoji-picker.tsx similarity index 89% rename from src/common/components/decks/deck-threads-form/deck-threads-form-emoji-picker.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-emoji-picker.tsx index 1f03efe395a..f2fa1954b0f 100644 --- a/src/common/components/decks/deck-threads-form/deck-threads-form-emoji-picker.tsx +++ b/src/common/features/decks/deck-threads-form/deck-threads-form-emoji-picker.tsx @@ -1,5 +1,5 @@ import React, { useRef } from "react"; -import { EmojiPicker } from "../../emoji-picker"; +import { EmojiPicker } from "../../../components/emoji-picker"; import { Button } from "@ui/button"; import { UilEmoji } from "@iconscout/react-unicons"; diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-manager.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-manager.tsx similarity index 97% rename from src/common/components/decks/deck-threads-form/deck-threads-form-manager.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-manager.tsx index fe7bb536c05..4842ff5b5ae 100644 --- a/src/common/components/decks/deck-threads-form/deck-threads-form-manager.tsx +++ b/src/common/features/decks/deck-threads-form/deck-threads-form-manager.tsx @@ -2,7 +2,7 @@ import React, { createContext, useState } from "react"; import * as bridgeApi from "../../../api/bridge"; import { formatError } from "../../../api/operations"; import { Entry } from "../../../store/entries/types"; -import { error } from "../../feedback"; +import { error } from "../../../components/feedback"; import { ProfileFilter } from "../../../store/global/types"; import { _t } from "../../../i18n"; import { useCommunityApi, useThreadsApi } from "./api"; diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-thread-selection.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-thread-selection.tsx similarity index 95% rename from src/common/components/decks/deck-threads-form/deck-threads-form-thread-selection.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-thread-selection.tsx index 75119043405..45257480fc6 100644 --- a/src/common/components/decks/deck-threads-form/deck-threads-form-thread-selection.tsx +++ b/src/common/features/decks/deck-threads-form/deck-threads-form-thread-selection.tsx @@ -1,6 +1,6 @@ import React from "react"; import { _t } from "../../../i18n"; -import { UserAvatar } from "../../user-avatar"; +import { UserAvatar } from "../../../components/user-avatar"; import { useMappedStore } from "../../../store/use-mapped-store"; import { AVAILABLE_THREAD_HOSTS } from "../consts"; import { Dropdown, DropdownItem, DropdownMenu, DropdownToggle } from "@ui/dropdown"; diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-toolbar-image-picker.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-toolbar-image-picker.tsx similarity index 93% rename from src/common/components/decks/deck-threads-form/deck-threads-form-toolbar-image-picker.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-toolbar-image-picker.tsx index 686244f8e10..9a153c8ad68 100644 --- a/src/common/components/decks/deck-threads-form/deck-threads-form-toolbar-image-picker.tsx +++ b/src/common/features/decks/deck-threads-form/deck-threads-form-toolbar-image-picker.tsx @@ -1,14 +1,14 @@ -import Tooltip from "../../tooltip"; +import Tooltip from "../../../components/tooltip"; import { _t } from "../../../i18n"; import React, { useRef, useState } from "react"; -import AddImage from "../../add-image"; +import AddImage from "../../../components/add-image"; import { useMappedStore } from "../../../store/use-mapped-store"; import { getAccessToken } from "../../../helper/user-token"; import { uploadImage } from "../../../api/misc"; -import { error } from "../../feedback"; +import { error } from "../../../components/feedback"; import axios from "axios"; -import Gallery from "../../gallery"; -import { PopperDropdown } from "../../popper-dropdown"; +import Gallery from "../../../components/gallery"; +import { PopperDropdown } from "../../../components/popper-dropdown"; import { Button } from "@ui/button"; import { UilImage } from "@iconscout/react-unicons"; diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-toolbar-video-picker.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-toolbar-video-picker.tsx similarity index 92% rename from src/common/components/decks/deck-threads-form/deck-threads-form-toolbar-video-picker.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-toolbar-video-picker.tsx index f379871dd60..19ae209edbb 100644 --- a/src/common/components/decks/deck-threads-form/deck-threads-form-toolbar-video-picker.tsx +++ b/src/common/features/decks/deck-threads-form/deck-threads-form-toolbar-video-picker.tsx @@ -1,6 +1,6 @@ -import Tooltip from "../../tooltip"; +import Tooltip from "../../../components/tooltip"; import { _t } from "../../../i18n"; -import { PopperDropdown } from "../../popper-dropdown"; +import { PopperDropdown } from "../../../components/popper-dropdown"; import { videoSvg } from "../../../img/svg"; import React, { useState } from "react"; import { useMappedStore } from "../../../store/use-mapped-store"; diff --git a/src/common/components/decks/deck-threads-form/deck-threads-form-toolbar.tsx b/src/common/features/decks/deck-threads-form/deck-threads-form-toolbar.tsx similarity index 100% rename from src/common/components/decks/deck-threads-form/deck-threads-form-toolbar.tsx rename to src/common/features/decks/deck-threads-form/deck-threads-form-toolbar.tsx diff --git a/src/common/components/decks/deck-threads-form/index.tsx b/src/common/features/decks/deck-threads-form/index.tsx similarity index 98% rename from src/common/components/decks/deck-threads-form/index.tsx rename to src/common/features/decks/deck-threads-form/index.tsx index 64bea25a57b..4bfcecb6526 100644 --- a/src/common/components/decks/deck-threads-form/index.tsx +++ b/src/common/features/decks/deck-threads-form/index.tsx @@ -3,9 +3,9 @@ import "./_index.scss"; import { arrowLeftSvg } from "../../../img/svg"; import { DeckThreadsFormContext } from "./deck-threads-form-manager"; import { _t } from "../../../i18n"; -import { UserAvatar } from "../../user-avatar"; +import { UserAvatar } from "../../../components/user-avatar"; import { useMappedStore } from "../../../store/use-mapped-store"; -import { AvailableCredits } from "../../available-credits"; +import { AvailableCredits } from "../../../components/available-credits"; import { useLocation } from "react-router"; import { DeckThreadsFormControl } from "./deck-threads-form-control"; import { DeckThreadsFormThreadSelection } from "./deck-threads-form-thread-selection"; diff --git a/src/common/components/decks/deck-toolbar/_deck-floating-toolbar-activator.scss b/src/common/features/decks/deck-toolbar/_deck-floating-toolbar-activator.scss similarity index 100% rename from src/common/components/decks/deck-toolbar/_deck-floating-toolbar-activator.scss rename to src/common/features/decks/deck-toolbar/_deck-floating-toolbar-activator.scss diff --git a/src/common/components/decks/deck-toolbar/_deck-toolbar-manager.scss b/src/common/features/decks/deck-toolbar/_deck-toolbar-manager.scss similarity index 100% rename from src/common/components/decks/deck-toolbar/_deck-toolbar-manager.scss rename to src/common/features/decks/deck-toolbar/_deck-toolbar-manager.scss diff --git a/src/common/components/decks/deck-toolbar/deck-floating-toolbar-activator.tsx b/src/common/features/decks/deck-toolbar/deck-floating-toolbar-activator.tsx similarity index 100% rename from src/common/components/decks/deck-toolbar/deck-floating-toolbar-activator.tsx rename to src/common/features/decks/deck-toolbar/deck-floating-toolbar-activator.tsx diff --git a/src/common/components/decks/deck-toolbar/deck-toolbar-base-actions.tsx b/src/common/features/decks/deck-toolbar/deck-toolbar-base-actions.tsx similarity index 91% rename from src/common/components/decks/deck-toolbar/deck-toolbar-base-actions.tsx rename to src/common/features/decks/deck-toolbar/deck-toolbar-base-actions.tsx index df96d5703eb..1e7cf008fc2 100644 --- a/src/common/components/decks/deck-toolbar/deck-toolbar-base-actions.tsx +++ b/src/common/features/decks/deck-toolbar/deck-toolbar-base-actions.tsx @@ -1,9 +1,9 @@ import { bellSvg, rocketSvg } from "../../../img/svg"; import React, { useState } from "react"; import { useMappedStore } from "../../../store/use-mapped-store"; -import { WalletBadge } from "../../navbar/user-nav"; +import { WalletBadge } from "../../../components/navbar/user-nav"; import { dotsMenuIconSvg, walletIconSvg } from "../icons"; -import { NavbarMainSidebar } from "../../navbar/navbar-main-sidebar"; +import { NavbarMainSidebar } from "../../../components/navbar/navbar-main-sidebar"; import { Button } from "@ui/button"; import { History } from "history"; diff --git a/src/common/components/decks/deck-toolbar/deck-toolbar-create.tsx b/src/common/features/decks/deck-toolbar/deck-toolbar-create.tsx similarity index 100% rename from src/common/components/decks/deck-toolbar/deck-toolbar-create.tsx rename to src/common/features/decks/deck-toolbar/deck-toolbar-create.tsx diff --git a/src/common/components/decks/deck-toolbar/deck-toolbar-manager.tsx b/src/common/features/decks/deck-toolbar/deck-toolbar-manager.tsx similarity index 100% rename from src/common/components/decks/deck-toolbar/deck-toolbar-manager.tsx rename to src/common/features/decks/deck-toolbar/deck-toolbar-manager.tsx diff --git a/src/common/components/decks/deck-toolbar/deck-toolbar-toggle-area.tsx b/src/common/features/decks/deck-toolbar/deck-toolbar-toggle-area.tsx similarity index 100% rename from src/common/components/decks/deck-toolbar/deck-toolbar-toggle-area.tsx rename to src/common/features/decks/deck-toolbar/deck-toolbar-toggle-area.tsx diff --git a/src/common/components/decks/deck-toolbar/deck-toolbar-user.tsx b/src/common/features/decks/deck-toolbar/deck-toolbar-user.tsx similarity index 89% rename from src/common/components/decks/deck-toolbar/deck-toolbar-user.tsx rename to src/common/features/decks/deck-toolbar/deck-toolbar-user.tsx index cfc8f2ffbf2..9ca4cdf24ed 100644 --- a/src/common/components/decks/deck-toolbar/deck-toolbar-user.tsx +++ b/src/common/features/decks/deck-toolbar/deck-toolbar-user.tsx @@ -1,12 +1,12 @@ -import { UserAvatar } from "../../user-avatar"; +import { UserAvatar } from "../../../components/user-avatar"; import { FullAccount } from "../../../store/accounts/types"; import React, { useState } from "react"; import { useMappedStore } from "../../../store/use-mapped-store"; import { _t } from "../../../i18n"; import { Link } from "react-router-dom"; import { Button } from "@ui/button"; -import { NavbarSideThemeSwitcher } from "../../navbar/sidebar/navbar-side-theme-switcher"; -import { NavbarSide } from "../../navbar/sidebar/navbar-side"; +import { NavbarSideThemeSwitcher } from "../../../components/navbar/sidebar/navbar-side-theme-switcher"; +import { NavbarSide } from "../../../components/navbar/sidebar/navbar-side"; import { History } from "history"; interface Props { diff --git a/src/common/components/decks/deck-toolbar/deck-toolbar.tsx b/src/common/features/decks/deck-toolbar/deck-toolbar.tsx similarity index 87% rename from src/common/components/decks/deck-toolbar/deck-toolbar.tsx rename to src/common/features/decks/deck-toolbar/deck-toolbar.tsx index 9139ffebef4..fd418f3ddfd 100644 --- a/src/common/components/decks/deck-toolbar/deck-toolbar.tsx +++ b/src/common/features/decks/deck-toolbar/deck-toolbar.tsx @@ -3,21 +3,21 @@ import { useMappedStore } from "../../../store/use-mapped-store"; import "../_deck-toolbar.scss"; import { History } from "history"; import { _t } from "../../../i18n"; -import { PurchaseQrDialog } from "../../purchase-qr"; -import Gallery from "../../gallery"; -import Drafts from "../../drafts"; -import Bookmarks from "../../bookmarks"; -import Schedules from "../../schedules"; -import Fragments from "../../fragments"; +import { PurchaseQrDialog } from "../../../components/purchase-qr"; +import Gallery from "../../../components/gallery"; +import Drafts from "../../../components/drafts"; +import Bookmarks from "../../../components/bookmarks"; +import Schedules from "../../../components/schedules"; +import Fragments from "../../../components/fragments"; import { useLocation } from "react-router"; import { DeckToolbarUser } from "./deck-toolbar-user"; import { DeckToolbarBaseActions } from "./deck-toolbar-base-actions"; import { DeckToolbarToggleArea } from "./deck-toolbar-toggle-area"; import { DeckToolbarManager } from "./deck-toolbar-manager"; import { DeckToolbarCreate } from "./deck-toolbar-create"; -import UserNotifications from "../../notifications"; -import NotificationHandler from "../../notification-handler"; -import Login from "../../login"; +import UserNotifications from "../../../components/notifications"; +import NotificationHandler from "../../../components/notification-handler"; +import Login from "../../../components/login"; interface Props { isExpanded: boolean; diff --git a/src/common/components/decks/header/deck-header-reloading.tsx b/src/common/features/decks/header/deck-header-reloading.tsx similarity index 100% rename from src/common/components/decks/header/deck-header-reloading.tsx rename to src/common/features/decks/header/deck-header-reloading.tsx diff --git a/src/common/components/decks/header/deck-header-settings-item.tsx b/src/common/features/decks/header/deck-header-settings-item.tsx similarity index 100% rename from src/common/components/decks/header/deck-header-settings-item.tsx rename to src/common/features/decks/header/deck-header-settings-item.tsx diff --git a/src/common/components/decks/header/deck-header-settings.tsx b/src/common/features/decks/header/deck-header-settings.tsx similarity index 100% rename from src/common/components/decks/header/deck-header-settings.tsx rename to src/common/features/decks/header/deck-header-settings.tsx diff --git a/src/common/components/decks/header/deck-header-update-interval-settings.tsx b/src/common/features/decks/header/deck-header-update-interval-settings.tsx similarity index 100% rename from src/common/components/decks/header/deck-header-update-interval-settings.tsx rename to src/common/features/decks/header/deck-header-update-interval-settings.tsx diff --git a/src/common/components/decks/header/deck-header.tsx b/src/common/features/decks/header/deck-header.tsx similarity index 98% rename from src/common/components/decks/header/deck-header.tsx rename to src/common/features/decks/header/deck-header.tsx index 01afa0661ed..2124cdfb0a7 100644 --- a/src/common/components/decks/header/deck-header.tsx +++ b/src/common/features/decks/header/deck-header.tsx @@ -10,9 +10,9 @@ import { DeckHeaderSettings } from "./deck-header-settings"; import { DeckHeaderReloading } from "./deck-header-reloading"; import { DraggableProvidedDragHandleProps } from "react-beautiful-dnd"; import { classNameObject } from "../../../helper/class-name-object"; -import Tooltip from "../../tooltip"; import { Button } from "@ui/button"; import { Accordion, AccordionCollapse, AccordionToggle } from "@ui/accordion"; +import Tooltip from "../../../components/tooltip"; export interface Props { title: string; diff --git a/src/common/components/decks/icons.tsx b/src/common/features/decks/icons.tsx similarity index 100% rename from src/common/components/decks/icons.tsx rename to src/common/features/decks/icons.tsx diff --git a/src/common/components/decks/index.tsx b/src/common/features/decks/index.tsx similarity index 98% rename from src/common/components/decks/index.tsx rename to src/common/features/decks/index.tsx index b3d657a9f7e..1e3fccfe5e6 100644 --- a/src/common/components/decks/index.tsx +++ b/src/common/features/decks/index.tsx @@ -10,7 +10,7 @@ import { DeckFloatingManager } from "./deck-floating-manager"; import { DeckLoader } from "./deck-loader"; import { DeckThreadsForm, DeckThreadsFormManager } from "./deck-threads-form"; import { DeckThreadsManager } from "./columns/deck-threads-manager"; -import SSRSuspense from "../ssr-suspense"; +import SSRSuspense from "../../components/ssr-suspense"; import { classNameObject } from "../../helper/class-name-object"; import useMount from "react-use/lib/useMount"; import { DeckFloatingToolbarActivator } from "./deck-toolbar/deck-floating-toolbar-activator"; diff --git a/src/common/components/decks/old-deck-migration.tsx b/src/common/features/decks/old-deck-migration.tsx similarity index 100% rename from src/common/components/decks/old-deck-migration.tsx rename to src/common/features/decks/old-deck-migration.tsx diff --git a/src/common/pages/decks.tsx b/src/common/features/decks/screens/decks.tsx similarity index 59% rename from src/common/pages/decks.tsx rename to src/common/features/decks/screens/decks.tsx index 3913d8688c6..d5f61f60c10 100644 --- a/src/common/pages/decks.tsx +++ b/src/common/features/decks/screens/decks.tsx @@ -1,14 +1,14 @@ -import { Decks } from "../components/decks"; +import { Decks } from "../index"; import React from "react"; import { History } from "history"; import { connect } from "react-redux"; -import { pageMapDispatchToProps, pageMapStateToProps } from "./common"; -import Meta from "../components/meta"; -import Theme from "../components/theme"; -import Feedback from "../components/feedback"; -import { useMappedStore } from "../store/use-mapped-store"; -import { getMetaProps } from "../util/get-meta-props"; -import { _t } from "../i18n"; +import Meta from "../../../components/meta"; +import Theme from "../../../components/theme"; +import Feedback from "../../../components/feedback"; +import { useMappedStore } from "../../../store/use-mapped-store"; +import { getMetaProps } from "../../../util/get-meta-props"; +import { _t } from "../../../i18n"; +import { pageMapDispatchToProps, pageMapStateToProps } from "../../../pages/common"; interface Props { history: History; diff --git a/src/common/components/decks/types/deck-grid-item.ts b/src/common/features/decks/types/deck-grid-item.ts similarity index 100% rename from src/common/components/decks/types/deck-grid-item.ts rename to src/common/features/decks/types/deck-grid-item.ts diff --git a/src/common/components/decks/types/deck-grid.ts b/src/common/features/decks/types/deck-grid.ts similarity index 100% rename from src/common/components/decks/types/deck-grid.ts rename to src/common/features/decks/types/deck-grid.ts diff --git a/src/common/components/decks/types/index.ts b/src/common/features/decks/types/index.ts similarity index 100% rename from src/common/components/decks/types/index.ts rename to src/common/features/decks/types/index.ts diff --git a/src/common/components/decks/types/old-decks.ts b/src/common/features/decks/types/old-decks.ts similarity index 100% rename from src/common/components/decks/types/old-decks.ts rename to src/common/features/decks/types/old-decks.ts diff --git a/src/common/components/decks/utils/index.ts b/src/common/features/decks/utils/index.ts similarity index 100% rename from src/common/components/decks/utils/index.ts rename to src/common/features/decks/utils/index.ts diff --git a/src/common/components/decks/utils/new-data-coming-paginated-condition.ts b/src/common/features/decks/utils/new-data-coming-paginated-condition.ts similarity index 100% rename from src/common/components/decks/utils/new-data-coming-paginated-condition.ts rename to src/common/features/decks/utils/new-data-coming-paginated-condition.ts diff --git a/src/common/components/decks/utils/use-entry-checking.tsx b/src/common/features/decks/utils/use-entry-checking.tsx similarity index 100% rename from src/common/components/decks/utils/use-entry-checking.tsx rename to src/common/features/decks/utils/use-entry-checking.tsx diff --git a/src/common/pages/submit/index.tsx b/src/common/pages/submit/index.tsx index fb0cbc5572b..7341e7aa1f2 100644 --- a/src/common/pages/submit/index.tsx +++ b/src/common/pages/submit/index.tsx @@ -67,7 +67,7 @@ import { Spinner } from "@ui/spinner"; import { FormControl } from "@ui/input"; import { IntroTour } from "@ui/intro-tour"; import { IntroStep } from "@ui/core"; -import { dotsMenuIconSvg } from "../../components/decks/icons"; +import { dotsMenuIconSvg } from "../../features/decks/icons"; interface MatchProps { match: MatchType;