mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 00:56:26 +08:00
feat: client dev landing page
This commit is contained in:
@@ -8,3 +8,11 @@ export function AffineBasicPage() {
|
||||
}, []);
|
||||
return null;
|
||||
}
|
||||
|
||||
export function AffineDevPage() {
|
||||
useEffect(() => {
|
||||
location.href = 'http://localhost:8080';
|
||||
redirect('http://localhost:8080');
|
||||
}, []);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const Container = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
& > a {
|
||||
color: #333;
|
||||
padding: 10px;
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export function LandingPage() {
|
||||
return <div>TBD</div>;
|
||||
return (
|
||||
<Container>
|
||||
<Link to="/affine-dev">Affine Dev Build</Link>
|
||||
<Link to="/affine">Affine Dist Bundle</Link>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createBrowserRouter } from 'react-router-dom';
|
||||
import { AffineBasicPage } from './AFFiNE/index.js';
|
||||
import { AffineBasicPage, AffineDevPage } from './AFFiNE/index.js';
|
||||
import { LandingPage } from './Landing/index.js';
|
||||
import { RootLayout } from './Root.js';
|
||||
|
||||
@@ -14,6 +14,11 @@ export const routes = [
|
||||
name: 'AFFiNE Basic',
|
||||
element: <AffineBasicPage />,
|
||||
},
|
||||
{
|
||||
path: '/affine-dev',
|
||||
name: 'AFFiNE Dev',
|
||||
element: <AffineDevPage />,
|
||||
},
|
||||
];
|
||||
export const router = createBrowserRouter([
|
||||
{ path: '/', element: <RootLayout />, children: routes },
|
||||
|
||||
Reference in New Issue
Block a user