fix postform position on mobile

This commit is contained in:
plebeius
2025-12-29 16:40:33 +01:00
parent eb3b02ae9e
commit 0d34b14185
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -83,8 +83,8 @@ const BoardLayout = () => {
{isMobile {isMobile
? (subplebbitAddress || isInAllView || isInModView || isInSubscriptionsView || pendingPost?.subplebbitAddress) && ( ? (subplebbitAddress || isInAllView || isInModView || isInSubscriptionsView || pendingPost?.subplebbitAddress) && (
<> <>
<MobileBoardButtons />
<PostForm key={key} /> <PostForm key={key} />
<MobileBoardButtons />
</> </>
) )
: (subplebbitAddress || isInAllView || isInModView || isInSubscriptionsView || pendingPost?.subplebbitAddress) && ( : (subplebbitAddress || isInAllView || isInModView || isInSubscriptionsView || pendingPost?.subplebbitAddress) && (
@@ -139,7 +139,7 @@
} }
.postFormMobile { .postFormMobile {
margin-bottom: 6px; margin-bottom: 8px;
} }
.postFormTable { .postFormTable {
+3 -1
View File
@@ -8,7 +8,7 @@ import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/s
import { getHasThumbnail, getLinkMediaInfo } from '../../lib/utils/media-utils'; import { getHasThumbnail, getLinkMediaInfo } from '../../lib/utils/media-utils';
import { formatMarkdown } from '../../lib/utils/post-utils'; import { formatMarkdown } from '../../lib/utils/post-utils';
import { isValidURL } from '../../lib/utils/url-utils'; import { isValidURL } from '../../lib/utils/url-utils';
import { isAllView, isModView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils'; import { isAllView, isCatalogView, isModView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils';
import { useDefaultSubplebbits } from '../../hooks/use-default-subplebbits'; import { useDefaultSubplebbits } from '../../hooks/use-default-subplebbits';
import { useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address'; import { useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address';
import useFetchGifFirstFrame from '../../hooks/use-fetch-gif-first-frame'; import useFetchGifFirstFrame from '../../hooks/use-fetch-gif-first-frame';
@@ -361,6 +361,7 @@ const PostForm = () => {
const isInAllView = isAllView(location.pathname); const isInAllView = isAllView(location.pathname);
const isInModView = isModView(location.pathname); const isInModView = isModView(location.pathname);
const isInSubscriptionsView = isSubscriptionsView(location.pathname, params); const isInSubscriptionsView = isSubscriptionsView(location.pathname, params);
const isInCatalogView = isCatalogView(location.pathname, params);
const commentCid = params?.commentCid; const commentCid = params?.commentCid;
const post = useSubplebbitsPagesStore((state) => state.comments[commentCid as string]); const post = useSubplebbitsPagesStore((state) => state.comments[commentCid as string]);
@@ -424,6 +425,7 @@ const PostForm = () => {
{showForm && <PostFormTable closeForm={() => setShowForm(false)} postCid={postCid} />} {showForm && <PostFormTable closeForm={() => setShowForm(false)} postCid={postCid} />}
</> </>
)} )}
{isInCatalogView && <hr />}
</div> </div>
</> </>
); );