File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1
- import type { Tables } from "@/types/database-generated. types" ;
1
+ import type { Guestbook } from "@/data/guestbook/ types" ;
2
2
import { getTzDay } from "@/util/days" ;
3
+ import { PinIcon } from "lucide-react" ;
3
4
4
5
export default function Bubble ( {
5
6
message,
6
7
color,
7
8
created_at,
8
- } : Tables < "guestbook" > ) {
9
+ pinned,
10
+ } : Guestbook ) {
9
11
return (
10
12
< div className = "flex flex-row justify-end items-end gap-1" >
11
- < span className = "text-[10px] text-primary" >
12
- { getTzDay ( created_at ) . format ( "YY.MM" ) }
13
- </ span >
13
+ < div className = "flex flex-col items-end gap-1" >
14
+ { pinned && < PinIcon className = "h-3 w-3 text-primary stroke-[1.5px]" /> }
15
+ < span className = "text-[10px] text-primary" >
16
+ { getTzDay ( created_at ) . format ( "YY.MM" ) }
17
+ </ span >
18
+ </ div >
14
19
< div
15
- className = "p-0 break-all leading-6 text-sm max-w-[90%] font-medium px-1 underline decoration-4 underline-offset-0 "
16
- style = { { textDecorationColor : color } }
20
+ className = "p-0 break-all leading-6 text-sm max-w-[90%] font-medium px-2 py-0.5 border-2 "
21
+ style = { { borderColor : color } }
17
22
>
18
23
{ message }
19
24
</ div >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default function MessageInput() {
11
11
< Input
12
12
{ ...register ( "message" ) }
13
13
style = { { borderColor : color } }
14
- className = "rounded-none border-t-0 border-l-0 border-r-0 border-b-4 "
14
+ className = "rounded-none border-2 "
15
15
maxLength = { 1000 }
16
16
/>
17
17
) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export const baseQuery = (
19
19
client ( )
20
20
. from ( "guestbook" )
21
21
. select ( "*" , options )
22
+ . order ( "pinned" , { ascending : true } )
22
23
. order ( "created_at" , { ascending : false } ) ;
23
24
24
25
export const makeGetGuestbooks =
You can’t perform that action at this time.
0 commit comments