diff --git a/src/components/icons.tsx b/src/components/icons.tsx
index 8d8549945..7eb47df9f 100644
--- a/src/components/icons.tsx
+++ b/src/components/icons.tsx
@@ -233,3 +233,9 @@ export const CameraIcon = createIcon({
d: "M9.828 5l-2 2H4v12h16V7h-3.828l-2-2H9.828zM9 3h6l2 2h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4l2-2zm3 15a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11zm0-2a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z",
defaultProps,
});
+
+export const PlusCircleIcon = createIcon({
+ displayName: "PlusCircleIcon",
+ d: "M11 11V7h2v4h4v2h-4v4h-2v-4H7v-2h4zm1 11C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z",
+ defaultProps,
+});
diff --git a/src/components/page/index.tsx b/src/components/page/index.tsx
index 0fa7c9b9b..73098e62b 100644
--- a/src/components/page/index.tsx
+++ b/src/components/page/index.tsx
@@ -23,27 +23,27 @@ export const Page = ({ children }: { children: React.ReactNode }) => {
const isMobile = useIsMobile();
return (
-
-
- {isMobile && }
-
- {!isMobile && }
-
-
- {children}
-
+
+
+
+ {isMobile && }
+
+ {!isMobile && }
+
+ {children}
+
+ {!isMobile && }
- {!isMobile && }
-
- {isMobile && }
-
+ {isMobile && }
+
+
);
};
diff --git a/src/components/page/mobile-bottom-nav.tsx b/src/components/page/mobile-bottom-nav.tsx
index 7b426ce33..bafc46300 100644
--- a/src/components/page/mobile-bottom-nav.tsx
+++ b/src/components/page/mobile-bottom-nav.tsx
@@ -1,10 +1,14 @@
-import { ChatIcon } from "@chakra-ui/icons";
import { Flex, IconButton } from "@chakra-ui/react";
+import { useContext } from "react";
import { useNavigate } from "react-router-dom";
-import { FeedIcon, HomeIcon, NotificationIcon, SearchIcon, SettingsIcon } from "../icons";
+import { useCurrentAccount } from "../../hooks/use-current-account";
+import { PostModalContext } from "../../providers/post-modal-provider";
+import { ChatIcon, HomeIcon, NotificationIcon, PlusCircleIcon, SearchIcon } from "../icons";
export default function MobileBottomNav() {
+ const { openModal } = useContext(PostModalContext);
const navigate = useNavigate();
+ const account = useCurrentAccount();
return (
@@ -16,6 +20,16 @@ export default function MobileBottomNav() {
flexGrow="1"
size="md"
/>
+ }
+ aria-label="New Note"
+ onClick={() => {
+ openModal();
+ }}
+ variant="solid"
+ colorScheme="brand"
+ isDisabled={account.readonly}
+ />
} aria-label="Messages" onClick={() => navigate(`/dm`)} flexGrow="1" size="md" />
}
diff --git a/src/components/post-modal/index.tsx b/src/components/post-modal/index.tsx
index f97a64458..2c33c11d7 100644
--- a/src/components/post-modal/index.tsx
+++ b/src/components/post-modal/index.tsx
@@ -179,7 +179,7 @@ export const PostModal = ({ isOpen, onClose, initialDraft }: PostModalProps) =>
};
return (
-
+
{renderContent()}
diff --git a/src/providers/post-modal-provider.tsx b/src/providers/post-modal-provider.tsx
index 6678b5c2c..90f660de6 100644
--- a/src/providers/post-modal-provider.tsx
+++ b/src/providers/post-modal-provider.tsx
@@ -1,5 +1,6 @@
import { useDisclosure } from "@chakra-ui/react";
import React, { useCallback, useMemo, useState } from "react";
+import { ErrorBoundary } from "../components/error-boundary";
import { PostModal } from "../components/post-modal";
import { DraftNostrEvent } from "../types/nostr-event";
@@ -25,8 +26,10 @@ export const PostModalProvider = ({ children }: { children: React.ReactNode }) =
return (
- {isOpen && }
- {children}
+
+ {isOpen && }
+ {children}
+
);
};