Skip to content

Commit

Permalink
fix(cli): update condition to render tutorial component
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner authored and skogsmaskin committed Apr 25, 2022
1 parent f756ef2 commit 5b39e15
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import {useCurrentUser} from '@sanity/base/hooks'
import GetStartedTutorial from './GetStartedTutorial'

export default function CustomDefaultLayout() {
const currentUser = useCurrentUser()
const {value} = useCurrentUser()

const showTutorial = (value?.roles || []).length > 0

return (
<>
{currentUser.value && <GetStartedTutorial />}
{showTutorial && <GetStartedTutorial />}
<StudioRoot />
</>
)
Expand Down

3 comments on commit 5b39e15

@vercel
Copy link

@vercel vercel bot commented on 5b39e15 Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

studio-workshop – ./dev/workshop

studio-workshop.sanity.build
studio-workshop-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 5b39e15 Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio-git-next.sanity.build
test-studio.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 5b39e15 Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

perf-studio – ./

perf-studio.sanity.build
perf-studio-git-next.sanity.build

Please sign in to comment.