reorganize code into smaller files & dirs

This commit is contained in:
Martti Malmi
2024-01-04 15:48:19 +02:00
parent 5ea2eb711f
commit afa6d39a56
321 changed files with 671 additions and 671 deletions

View File

@ -1,12 +1,12 @@
import React, { useState } from "react";
import NavLink from "@/Element/Button/NavLink";
import NavLink from "@/Components/Button/NavLink";
import useLogin from "@/Hooks/useLogin";
import Icon from "@/Icons/Icon";
import { ProfileLink } from "@/Element/User/ProfileLink";
import { NoteCreatorButton } from "@/Element/Event/Create/NoteCreatorButton";
import Icon from "@/Components/Icons/Icon";
import { ProfileLink } from "@/Components/User/ProfileLink";
import { NoteCreatorButton } from "@/Components/Event/Create/NoteCreatorButton";
import classNames from "classnames";
import { useUserProfile } from "@snort/system-react";
import Avatar from "@/Element/User/Avatar";
import Avatar from "@/Components/User/Avatar";
import { useIntl } from "react-intl";
type MenuItem = {

View File

@ -2,15 +2,15 @@ import { useLocation, useNavigate } from "react-router-dom";
import React, { useCallback, useMemo } from "react";
import classNames from "classnames";
import { LogoHeader } from "@/Pages/Layout/LogoHeader";
import { rootTabItems, RootTabs } from "@/Element/Feed/RootTabs";
import { rootTabItems, RootTabs } from "@/Components/Feed/RootTabs";
import NotificationsHeader from "@/Pages/Layout/NotificationsHeader";
import { NostrLink, NostrPrefix, parseNostrLink } from "@snort/system";
import { bech32ToHex } from "@/SnortUtils";
import { bech32ToHex } from "@/Utils";
import { useEventFeed } from "@snort/system-react";
import { FormattedMessage } from "react-intl";
import DisplayName from "@/Element/User/DisplayName";
import DisplayName from "@/Components/User/DisplayName";
import useLogin from "@/Hooks/useLogin";
import Icon from "@/Icons/Icon";
import Icon from "@/Components/Icons/Icon";
export function Header() {
const navigate = useNavigate();

View File

@ -1,11 +1,11 @@
import useLogin from "../../Hooks/useLogin";
import { getCurrentSubscription } from "../../Subscription";
import { isBirthday, isChristmas, isHalloween, isStPatricksDay } from "../../SnortUtils";
import { getCurrentSubscription } from "../../Utils/Subscription";
import { isBirthday, isChristmas, isHalloween, isStPatricksDay } from "../../Utils";
import { Link } from "react-router-dom";
import { mapPlanName } from "../subscribe";
import Icon from "@/Icons/Icon";
import Icon from "@/Components/Icons/Icon";
import { unixNowMs } from "@snort/shared";
import { Birthday, Day } from "@/Const";
import { Birthday, Day } from "@/Utils/Const";
const getExtra = () => {
if (isBirthday()) {

View File

@ -1,17 +1,17 @@
import { LogoHeader } from "./LogoHeader";
import { Link, useNavigate } from "react-router-dom";
import Icon from "@/Icons/Icon";
import { ProfileLink } from "../../Element/User/ProfileLink";
import Avatar from "../../Element/User/Avatar";
import Icon from "@/Components/Icons/Icon";
import { ProfileLink } from "@/Components/User/ProfileLink";
import Avatar from "@/Components/User/Avatar";
import useLogin from "../../Hooks/useLogin";
import { useUserProfile } from "@snort/system-react";
import { NoteCreatorButton } from "../../Element/Event/Create/NoteCreatorButton";
import { NoteCreatorButton } from "@/Components/Event/Create/NoteCreatorButton";
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
import classNames from "classnames";
import { getCurrentSubscription } from "@/Subscription";
import { getCurrentSubscription } from "@/Utils/Subscription";
import { HasNotificationsMarker } from "@/Pages/Layout/HasNotificationsMarker";
import NavLink from "@/Element/Button/NavLink";
import { subscribeToNotifications } from "@/Notifications";
import NavLink from "@/Components/Button/NavLink";
import { subscribeToNotifications } from "@/Utils/Notifications";
import useEventPublisher from "@/Hooks/useEventPublisher";
import { Sats, useWallet } from "@/Wallet";
import { useEffect, useState } from "react";

View File

@ -1,13 +1,13 @@
import { useNavigate } from "react-router-dom";
import Icon from "@/Icons/Icon";
import Icon from "@/Components/Icons/Icon";
import useKeyboardShortcut from "@/Hooks/useKeyboardShortcut";
import { isFormElement } from "@/SnortUtils";
import { isFormElement } from "@/Utils";
import useLogin from "@/Hooks/useLogin";
import useEventPublisher from "@/Hooks/useEventPublisher";
import { HasNotificationsMarker } from "@/Pages/Layout/HasNotificationsMarker";
import NavLink from "@/Element/Button/NavLink";
import NavLink from "@/Components/Button/NavLink";
import classNames from "classnames";
import { subscribeToNotifications } from "@/Notifications";
import { subscribeToNotifications } from "@/Utils/Notifications";
const NotificationsHeader = () => {
const navigate = useNavigate();

View File

@ -1,6 +1,6 @@
import SearchBox from "@/Element/SearchBox";
import TrendingNotes from "@/Element/Trending/TrendingPosts";
import TrendingHashtags from "@/Element/Trending/TrendingHashtags";
import SearchBox from "@/Components/SearchBox/SearchBox";
import TrendingNotes from "@/Components/Trending/TrendingPosts";
import TrendingHashtags from "@/Components/Trending/TrendingHashtags";
import { FormattedMessage } from "react-intl";
import classNames from "classnames";
import useLogin from "@/Hooks/useLogin";

View File

@ -3,20 +3,20 @@ import { useCallback } from "react";
import { Outlet, useLocation } from "react-router-dom";
import useLogin from "@/Hooks/useLogin";
import { isFormElement } from "@/SnortUtils";
import Toaster from "@/Toaster";
import { isFormElement } from "@/Utils";
import Toaster from "@/Components/Toaster/Toaster";
import { useTheme } from "@/Hooks/useTheme";
import { useLoginRelays } from "@/Hooks/useLoginRelays";
import { LoginUnlock } from "@/Element/PinPrompt";
import { LoginUnlock } from "@/Components/PinPrompt/PinPrompt";
import useKeyboardShortcut from "@/Hooks/useKeyboardShortcut";
import { LoginStore } from "@/Login";
import { LoginStore } from "@/Utils/Login";
import NavSidebar from "./NavSidebar";
import RightColumn from "./RightColumn";
import useLoginFeed from "@/Feed/LoginFeed";
import ErrorBoundary from "@/Element/ErrorBoundary";
import ErrorBoundary from "@/Components/ErrorBoundary";
import Footer from "@/Pages/Layout/Footer";
import { Header } from "@/Pages/Layout/Header";
import CloseButton from "@/Element/Button/CloseButton";
import CloseButton from "@/Components/Button/CloseButton";
import { useCommunityLeaders } from "@/Hooks/useCommunityLeaders";
export default function Index() {