1+ import { useUser } from '@clerk/shared/react' ;
12// eslint-disable-next-line no-restricted-imports
23import { css } from '@emotion/react' ;
34import type { PropsWithChildren } from 'react' ;
@@ -22,7 +23,15 @@ const buttonIdentifier = `${buttonIdentifierPrefix}-button`;
2223const contentIdentifier = `${ buttonIdentifierPrefix } -content` ;
2324
2425const _KeylessPrompt = ( _props : KeylessPromptProps ) => {
26+ const { isSignedIn } = useUser ( ) ;
2527 const [ isExpanded , setIsExpanded ] = useState ( false ) ;
28+
29+ useEffect ( ( ) => {
30+ if ( isSignedIn ) {
31+ setIsExpanded ( true ) ;
32+ }
33+ } , [ isSignedIn ] ) ;
34+
2635 const environment = useRevalidateEnvironment ( ) ;
2736 const claimed = Boolean ( environment . authConfig . claimedAt ) ;
2837
@@ -387,9 +396,11 @@ const _KeylessPrompt = (_props: KeylessPromptProps) => {
387396 Dashboard.
388397 </ >
389398 ) : (
390- < >
391- We generated temporary API keys for you. Link this application to your Clerk account to configure it.
392- </ >
399+ < p >
400+ { isSignedIn
401+ ? "You've created your first user! Link this application to your Clerk account to explore the Dashboard."
402+ : 'We generated temporary API keys for you. Link this application to your Clerk account to configure it.' }
403+ </ p >
393404 ) }
394405 </ p >
395406 </ div >
@@ -420,7 +431,10 @@ const _KeylessPrompt = (_props: KeylessPromptProps) => {
420431 data-expanded = { isForcedExpanded }
421432 css = { css `
422433 ${ mainCTAStyles } ;
423- animation: ${ isForcedExpanded && 'show-button 600ms ease-in forwards' } ;
434+ animation: ${ isForcedExpanded && isSignedIn
435+ ? 'show-button 800ms ease forwards'
436+ : 'show-button 650ms ease-in forwards' } ;
437+
424438 @keyframes show-button {
425439 0% ,
426440 5% {
0 commit comments