File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 6969 />
7070 </button >
7171 <span class =" bg-black-600 inline-block h-1 w-1 rounded-full" ></span >
72- <button onclick ={handleReply } class =" text-black-600 font-semibold"
73- >Reply</button
74- >
72+ <button onclick ={handleReply } class =" text-black-600 font-semibold" >Reply</button >
7573 <span class =" bg-black-600 inline-block h-1 w-1 rounded-full" ></span >
7674 <p class ="text-black-600" >{comment .time }</p >
7775 </div >
Original file line number Diff line number Diff line change @@ -29,4 +29,4 @@ export type PostData = {
2929 likes : number ;
3030 comments : number ;
3131 } ;
32- } ;
32+ } ;
Original file line number Diff line number Diff line change 66 import { Comment , MessageInput } from ' $lib/fragments' ;
77 import type { CommentType , PostData } from ' $lib/types' ;
88
9-
109 let listElement: HTMLElement ;
1110 let visiblePosts: PostData [] = $state ([]);
1211 let maxVisiblePosts = $state (20 );
9695 count ={post .count }
9796 callback ={{
9897 like : () => alert (' like' ),
99- comment : () => drawer ?.present ({ animate: true }),
98+ comment : () => {
99+ if (window .matchMedia (' (max-width: 768px)' ).matches ) {
100+ drawer ?.present ({ animate: true });
101+ } else {
102+ // comments to be shown in right aside
103+ }
104+ },
100105 menu : () => alert (' menu' )
101106 }}
102107 />
You can’t perform that action at this time.
0 commit comments