File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 102
102
"cross-env" : " 7.0.3" ,
103
103
"dotenv" : " 16.3.1" ,
104
104
"eslint" : " 8.56.0" ,
105
- "husky" : " 8.0.3" ,
106
105
"lint-staged" : " 15.2.0" ,
107
106
"postcss" : " 8.4.32" ,
108
107
"postcss-import" : " 16.0.0" ,
141
140
"string.prototype.matchall" : " npm:@nolyfill/string.prototype.matchall@latest"
142
141
}
143
142
}
144
- }
143
+ }
Original file line number Diff line number Diff line change @@ -7,11 +7,13 @@ import { SignInButton } from '@clerk/nextjs'
7
7
import { UserArrowLeftIcon } from '~/components/icons/user-arrow-left'
8
8
import { StyledButton } from '~/components/ui/button'
9
9
import { urlBuilder } from '~/lib/url-builder'
10
+ import { useModalStack } from '~/providers/root/modal-stack-provider'
10
11
11
12
import { CommentBoxMode , setCommentMode } from './hooks'
12
13
13
14
export function CommentBoxSignedOutContent ( ) {
14
15
const pathname = usePathname ( )
16
+ const { dismissAll } = useModalStack ( )
15
17
16
18
return (
17
19
< div className = "flex h-[150px] w-full space-x-4 rounded-lg bg-gray-100/80 center dark:bg-zinc-900/80" >
@@ -25,7 +27,13 @@ export function CommentBoxSignedOutContent() {
25
27
免登录评论
26
28
</ StyledButton >
27
29
< SignInButton mode = "modal" redirectUrl = { urlBuilder ( pathname ) . href } >
28
- < StyledButton variant = "primary" type = "button" >
30
+ < StyledButton
31
+ onClick = { ( ) => {
32
+ dismissAll ( )
33
+ } }
34
+ variant = "primary"
35
+ type = "button"
36
+ >
29
37
< UserArrowLeftIcon className = "mr-1 h-5 w-5" />
30
38
登录后才可以留言噢
31
39
</ StyledButton >
Original file line number Diff line number Diff line change 2
2
.cl-userButtonPopoverCard {
3
3
@apply border shadow-xl shadow-zinc-500/10 backdrop-blur-xl backdrop-saturate-150;
4
4
@apply border-zinc-200 bg-zinc-50/80 text-zinc-800;
5
- @apply py-4;
5
+ @apply pointer-events-auto py-4;
6
+
6
7
--accent : theme ('colors.zinc.900' );
7
8
--accentDark : theme ('colors.zinc.800' );
8
9
}
You can’t perform that action at this time.
0 commit comments