最后活跃于 1717386554

Korbs's Avatar Korbs 修订了这个 Gist 1717386554. 跳至此修订

1 file changed, 9 insertions, 1 deletion

if-else-statement.astro

@@ -1,6 +1,14 @@
1 + ---
2 + var UserLogin = false
3 + ---
4 +
5 + <!-- Use this method if the results only returns "true" or "false" -->
6 + {UserLogin ? <p>Log Out</p> : <p>Sign in</p>}
7 +
8 + <!-- Use this method if the results return other results that are not labeled as "true" or "false -->
1 9 {
2 10 ()=> {
3 - if (user.login === true) {
11 + if (UserLogin === "external") {
4 12 return <p>Log Out</p>
5 13 } else {
6 14 return <p>Sign In</p>

Korbs 修订了这个 Gist 1717386337. 跳至此修订

1 file changed, 9 insertions

if-else-statement.astro(file created)

@@ -0,0 +1,9 @@
1 + {
2 + ()=> {
3 + if (user.login === true) {
4 + return <p>Log Out</p>
5 + } else {
6 + return <p>Sign In</p>
7 + }
8 + }
9 + }
更新 更早