未验证 提交 c690a68b 编写于 作者: O Oğuzcan Köse 提交者: GitHub

Update index.js (#14528)

* Update index.js

* Update index.js

* Update examples/with-firebase-authentication/pages/index.js
Co-authored-by: NLuis Alvarez D <luis@vercel.com>
上级 435bf657
......@@ -15,7 +15,6 @@ const Index = () => {
user ? ['/api/getFood', user.token] : null,
fetcher
)
if (!user) {
return (
<>
......@@ -52,7 +51,11 @@ const Index = () => {
</Link>
</div>
{error && <div>Failed to fetch food!</div>}
{data && <div>Your favorite food is {data.food}.</div>}
{data ? (
<div>Your favorite food is {data.food}.</div>
) : (
<div>Loading...</div>
)}
</div>
)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册