浏览代码

only show register button if possible

C4illin 1 年之前
父节点
当前提交
549bcadc15
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/index.tsx

+ 5 - 3
src/index.tsx

@@ -277,9 +277,11 @@ const app = new Elysia()
                 </label>
               </fieldset>
               <div role="group">
-                <a href="/register" role="button" class="secondary">
-                  Register an account
-                </a>
+                {ACCOUNT_REGISTRATION && (
+                  <a href="/register" role="button" class="secondary">
+                    Register an account
+                  </a>
+                )}
                 <input type="submit" value="Login" />
               </div>
             </form>