Skip to content

Commit

Permalink
Cleanup2 (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
sktbrd authored and j-paterson committed Dec 24, 2024
1 parent 36dda27 commit 03d5cfd
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/common/components/organisms/FidgetSettingsEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
FidgetFieldConfig,
} from "@/common/fidgets";
import BackArrowIcon from "../atoms/icons/BackArrow";
import { FaTrashCan, FaTriangleExclamation } from "react-icons/fa6";
import { FaTrashCan } from "react-icons/fa6";
import { Button } from "@/common/components/atoms/button";
import {
Tabs,
Expand Down
1 change: 0 additions & 1 deletion src/common/components/organisms/LoadingSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import BrandHeader from "../molecules/BrandHeader";

export default function LoadingSidebar() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/organisms/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const Navigation: React.FC<NavProps> = ({ isEditable, enterEditMode }) => {
target={openInNewTab ? "_blank" : undefined}
>
{badgeText && <NavIconBadge>{badgeText}</NavIconBadge>}
<Icon aria-hidden="true" />
<Icon />
<span className="ms-3">{label}</span>
</Link>
</li>
Expand Down
3 changes: 1 addition & 2 deletions src/common/components/organisms/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import {
import { Button } from "@/common/components/atoms/button";
import { trackAnalyticsEvent } from "@/common/lib/utils/analyticsUtils";
import { AnalyticsEvent } from "@/common/providers/AnalyticsProvider";
import { formatEthereumAddress } from "@/common/lib/utils/ethereum";
import { Address, isAddress, zeroAddress } from "viem";
import { Address } from "viem";
import ScanAddress from "../molecules/ScanAddress";
import { AlchemyNetwork } from "@/fidgets/ui/gallery";

Expand Down
2 changes: 0 additions & 2 deletions src/common/components/organisms/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import React, {
useState,
useRef,
useMemo,
useEffect,
} from "react";
import Navigation from "./Navigation";
import LoadingSidebar from "./LoadingSidebar";
export interface SidebarProps {}

export type SidebarContextProviderProps = { children: React.ReactNode };
Expand Down
9 changes: 1 addition & 8 deletions src/common/components/organisms/TabBar.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import React from "react";
import { FaPlus } from "react-icons/fa6";
import { first, map } from "lodash";
import { useLoadFarcasterUser } from "@/common/data/queries/farcaster";
import { useFarcasterSigner } from "@/fidgets/farcaster";
import { memo, useEffect, useMemo, useState } from "react";
import { useAppStore } from "@/common/data/stores/app";
import { map } from "lodash";
import { Reorder, AnimatePresence } from "framer-motion";
import { Tab } from "../atoms/reorderable-tab";
import { useRouter } from "next/router";
import { SpaceLookupInfo } from "@/common/data/stores/app/space/spaceStore";
import NogsGateButton from "./NogsGateButton";
import Link from "next/link";

interface TabBarProps {
inHome?: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/common/components/pages/SpacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Space, { SpaceConfig, SpaceConfigSaveDetails } from "../templates/Space";
import { isUndefined } from "lodash";
import SpaceLoading from "@/common/components/templates/SpaceLoading";
import { useSidebarContext } from "@/common/components/organisms/Sidebar";
import moment from "moment";

export type SpacePageArgs = {
config?: SpaceConfig;
Expand Down
2 changes: 1 addition & 1 deletion src/common/data/stores/app/space/spaceStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const createSpaceStoreFunc = (
}

const localTab = draft.space.localSpaces[spaceId].tabs[tabName];
const remoteTab = draft.space.remoteSpaces[spaceId].tabs[tabName];
// const remoteTab = draft.space.remoteSpaces[spaceId].tabs[tabName];

// Compare timestamps if local tab exists
if (localTab) {
Expand Down
3 changes: 1 addition & 2 deletions src/common/fidgets/FidgetWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React from "react";
import { useAppStore } from "@/common/data/stores/app";
import { Card, CardContent } from "@/common/components/atoms/card";
import { toast } from "sonner";
Expand All @@ -18,7 +18,6 @@ import ScopedStyles from "@/common/components/molecules/ScopedStyles";
import GrabHandleIcon from "../components/atoms/icons/GrabHandle";
import StashIcon from "../components/atoms/icons/Stash";
import { FaX } from "react-icons/fa6";
import BackArrowIcon from "../components/atoms/icons/BackArrow";
import {
Tooltip,
TooltipContent,
Expand Down
2 changes: 0 additions & 2 deletions src/common/lib/theme/ThemeSettingsEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import { FaInfoCircle } from "react-icons/fa";
import { THEMES } from "@/constants/themes";
import { ThemeCard } from "@/common/lib/theme/ThemeCard";
import { FONT_FAMILY_OPTIONS_BY_NAME } from "@/common/lib/theme/fonts";
import { GiOpenBook } from "react-icons/gi";
import { FaBook } from "react-icons/fa";
import { MdMenuBook } from "react-icons/md";
import { VideoSelector } from "@/common/components/molecules/VideoSelector";

Expand Down
2 changes: 1 addition & 1 deletion src/fidgets/farcaster/Feed.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useCallback } from "react";
import { isNil, size } from "lodash";
import { isNil } from "lodash";
import {
FidgetArgs,
FidgetProperties,
Expand Down
2 changes: 1 addition & 1 deletion src/fidgets/farcaster/components/CastRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from "@neynar/nodejs-sdk/build/neynar-api/v2";
import { useFarcasterSigner } from "@/fidgets/farcaster/index";
import { CastReactionType } from "@/fidgets/farcaster/types";
import { bytesToHexString, ReactionType } from "@farcaster/core";
import { ReactionType } from "@farcaster/core";
import { hexToBytes } from "@noble/ciphers/utils";
import CreateCast, { DraftType } from "./CreateCast";
import Modal from "@/common/components/molecules/Modal";
Expand Down
10 changes: 5 additions & 5 deletions src/fidgets/farcaster/components/CreateCast.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FC, use, useCallback, useEffect, useState } from "react";
import React, { useCallback, useEffect, useState } from "react";
import { useEditor, EditorContent } from "@mod-protocol/react-editor";
import { EmbedsEditor } from "@mod-protocol/react-ui-shadcn/dist/lib/embeds";
import {
Expand All @@ -15,7 +15,7 @@ import {
} from "@mod-protocol/farcaster";
import { createRenderMentionsSuggestionConfig } from "@mod-protocol/react-ui-shadcn/dist/lib/mentions";
import { CastLengthUIIndicator } from "@mod-protocol/react-ui-shadcn/dist/components/cast-length-ui-indicator";
import { debounce, map, isEmpty, isUndefined, replace } from "lodash";
import { debounce, map, isEmpty, isUndefined } from "lodash";
import { Button } from "@/common/components/atoms/button";
import { MentionList } from "./mentionList";
import { ChannelList } from "@mod-protocol/react-ui-shadcn/dist/components/channel-list";
Expand All @@ -25,7 +25,7 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/common/components/atoms/popover";
import { CreationMod, RichEmbed } from "@mod-protocol/react";
import { CreationMod } from "@mod-protocol/react";
import { creationMods } from "@mod-protocol/mod-registry";
import { renderers } from "@mod-protocol/react-ui-shadcn/dist/renderers";
import { renderEmbedForUrl } from "./Embeds";
Expand Down Expand Up @@ -282,8 +282,8 @@ const CreateCast: React.FC<CreateCastProps> = ({
);

mentionsPositions = [];
const currentTextIndex = 0;
const finalText = text;
// const currentTextIndex = 0;
// const finalText = text;
const mentions = [];
mentionsText = text;

Expand Down
1 change: 0 additions & 1 deletion src/fidgets/farcaster/components/channelPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
CommandInput,
CommandItem,
CommandEmpty,
CommandGroup,
CommandList,
} from "@/common/components/atoms/command"; // Adjust the import paths if needed
import {
Expand Down
3 changes: 1 addition & 2 deletions src/pages/api/signerRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import requestHandler, {
} from "@/common/data/api/requestHandler";
import { APP_FID } from "@/constants/app";
import { AppSigner } from "@/constants/appServerSide";
import { NOGS_CONTRACT_ADDR } from "@/constants/nogs";
import { ALCHEMY_API, WARPCAST_API } from "@/constants/urls";
import { WARPCAST_API } from "@/constants/urls";
import {
SIGNED_KEY_REQUEST_TYPE,
SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN,
Expand Down
3 changes: 1 addition & 2 deletions src/pages/homebase/[tabname].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { useAppStore } from "@/common/data/stores/app";
import USER_NOT_LOGGED_IN_HOMEBASE_CONFIG from "@/constants/userNotLoggedInHomebase";
import SpacePage from "@/common/components/pages/SpacePage";
import { useRouter } from "next/router";
import { isArray, isNull, isString, noop } from "lodash";
import { isNull, isString } from "lodash";
import { SpaceConfigSaveDetails } from "@/common/components/templates/Space";
import TabBar from "@/common/components/organisms/TabBar";
import { useSidebarContext } from "@/common/components/organisms/Sidebar";
import tabOrder from "../api/space/homebase/tabOrder";

const Homebase: NextPageWithLayout = () => {
const {
Expand Down

0 comments on commit 03d5cfd

Please sign in to comment.