feat: post modal style

This commit is contained in:
DIYgod
2023-06-28 17:51:46 +01:00
parent 731d6e3544
commit 7c981e4617
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -1,6 +1,5 @@
"use client"
import { useState } from "react"
// TODO
import { Virtuoso } from "react-virtuoso"
@@ -30,8 +29,6 @@ const Comment = ({
(page) => (page?.list?.length ?? 0) > 0,
)
const [totalListHeight, setTotalListHeight] = useState(10)
return (
<div
className={cn("xlog-comment comment", className)}
@@ -58,12 +55,9 @@ const Comment = ({
<Virtuoso
className="xlog-comment-list"
style={{
height: fixHeight ? totalListHeight : undefined,
maxHeight: fixHeight ? "80vh" : undefined,
}}
useWindowScroll={!fixHeight}
totalListHeightChanged={(height) => {
setTotalListHeight(height + 71)
}}
data={data}
endReached={() => comments.hasNextPage && comments.fetchNextPage()}
components={{
+1 -1
View File
@@ -15,7 +15,7 @@ export default function SiteModal({ children }: { children: JSX.Element }) {
return (
<Modal
open={open}
panelClassName="max-w-[888px] py-12 px-20"
panelClassName="max-w-[888px] py-16 px-20 rounded-xl"
zIndex={9}
setOpen={() => router.back()}
>