Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Mar 1, 2024
1 parent 6ce454a commit 1376c4f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ export const ConversationList = ({
!messages?.length && isLoading ? (
<div className="w-full overflow-hidden h-full flex flex-col justify-start sm:w-full bg-gray-100">
{Array.from({ length: 12 }).map((_, idx) => (
<MessagePreviewCard key={idx} isLoading activeTab={activeTab} />
<MessagePreviewCard
key={idx}
isLoading
activeTab={activeTab}
address=""
setActiveTab={() => {}}
allow={() => Promise.resolve()}
/>
))}
</div>
) : !messages.length && !isLoading && !hasRecipientEnteredValue ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { PlusIcon } from "@heroicons/react/solid";
import { useTranslation } from "react-i18next";
import { classNames } from "../../../helpers";
import { IconButton } from "../IconButton/IconButton";
import type { ActiveTab } from "../../../store/xmtp";
import { useXmtpStore } from "../../../store/xmtp";

// To-do: rename this throughout the app, as this is no longer a dropdown
Expand All @@ -27,7 +28,10 @@ export const HeaderDropdown = ({
const resetRecipient = useXmtpStore((s) => s.resetRecipient);
const setConversationTopic = useXmtpStore((s) => s.setConversationTopic);

const tabs = [
const tabs: {
name: ActiveTab;
testId: string;
}[] = [
{ name: "messages", testId: "messages-button" },
{ name: "requests", testId: "requests-button" },
{ name: "blocked", testId: "blocked-button" },
Expand Down
4 changes: 3 additions & 1 deletion src/controllers/AddressInputController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export const AddressInputController = () => {
setConversationTopic("");
}}
onRightIconClick={() => {
void deny([recipientAddress]);
if (recipientAddress) {
void deny([recipientAddress]);
}
setChangedConsentCount(changedConsentCount + 1);
}}
/>
Expand Down

0 comments on commit 1376c4f

Please sign in to comment.