Commit 91ea1bf9 authored by Chunchi Che's avatar Chunchi Che

fix css styles

parent 2b54a30a
Pipeline #22818 passed with stages
in 14 minutes and 45 seconds
neos-assets/home-background.png

3.07 MB | W: | H:

neos-assets/home-background.png

651 KB | W: | H:

neos-assets/home-background.png
neos-assets/home-background.png
neos-assets/home-background.png
neos-assets/home-background.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -29,7 +29,7 @@ export const EndModal: React.FC = () => {
const onReturn = () => {
resetUniverse();
rs();
navigate("/");
navigate("/home");
};
return (
......
#root {
height: 100%;
}
body {
text-align: center;
position: relative;
margin: 0;
padding: 0;
border: 0;
}
.account-header {
position: relative;
z-index: 200;
......
import React from "react";
import React, { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { useSnapshot } from "valtio";
import { useConfig } from "@/config";
......@@ -10,9 +11,17 @@ const NeosConfig = useConfig();
const Home: React.FC = () => {
const { user } = useSnapshot(accountStore);
const navigate = useNavigate();
const onLogout = () => {}; // TODO
useEffect(() => {
if (!user) {
// 跳转SSO界面进行登录
navigate("/sso");
}
}, [user]);
return (
<>
<div className={styles["account-header"]}>
......@@ -36,11 +45,7 @@ const Home: React.FC = () => {
个人中心
</a>
<span className={styles.sep}>|</span>
<a
className={styles["header-user-btn"]}
href="javascript:void(0)"
onClick={onLogout}
>
<a className={styles["header-user-btn"]} href="" onClick={onLogout}>
登出
</a>
</div>
......@@ -48,10 +53,10 @@ const Home: React.FC = () => {
<div className={styles.container}>
<div className={styles.bg}></div>
<div className={styles.box}>
<p>欢迎来到NEOS</p>
<p>欢迎来到NEOS{user?.username}</p>
<button>娱乐匹配</button>
<button>竞技匹配</button>
<button>自定义匹配</button>
<button onClick={() => navigate("/match")}>自定义匹配</button>
<button>人机对战</button>
<button>录像回放</button>
<button>卡组编辑</button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment