This commit is contained in:
2026-04-21 12:01:53 +05:30
parent 6ea06d2d3b
commit 55e5e06da8

View File

@@ -31,7 +31,7 @@ const SAVE_LEAVES = [
] ]
export default function HomePage() { export default function HomePage() {
const { user, userId, mongoUser, secretKey, loading } = useAuth() const { user, userId, mongoUser, secretKey, loading, refreshMongoUser } = useAuth()
const navigate = useNavigate() const navigate = useNavigate()
const [entry, setEntry] = useState('') const [entry, setEntry] = useState('')
const [title, setTitle] = useState('') const [title, setTitle] = useState('')
@@ -63,7 +63,8 @@ export default function HomePage() {
async function markTutorialDone() { async function markTutorialDone() {
if (!user || !userId) return if (!user || !userId) return
const token = await user.getIdToken() const token = await user.getIdToken()
updateUserProfile(userId, { tutorial: true }, token).catch(console.error) await updateUserProfile(userId, { tutorial: true }, token).catch(console.error)
refreshMongoUser()
} }
const handleStartTour = () => { const handleStartTour = () => {