g# This is a combination of 6 commits. (#675)

perf: node render

perf: react flow performance

config

perf: pg index

perf: oauth login

doc

doc
This commit is contained in:
Archer
2024-01-01 13:46:09 +08:00
committed by GitHub
parent 9ccfda47b7
commit d645a7406b
13 changed files with 31 additions and 678 deletions

View File

@@ -1,59 +0,0 @@
import React, { useEffect } from 'react';
import { Box } from '@chakra-ui/react';
import { feConfigs } from '@/web/common/system/staticData';
import { serviceSideProps } from '@/web/common/utils/i18n';
import { useRouter } from 'next/router';
import Navbar from './components/Navbar';
import Hero from './components/Hero';
import Ability from './components/Ability';
import Choice from './components/Choice';
import Footer from './components/Footer';
import Loading from '@/components/Loading';
const Home = ({ homeUrl = '/' }: { homeUrl: string }) => {
const router = useRouter();
if (homeUrl !== '/') {
router.replace(homeUrl);
}
useEffect(() => {
router.prefetch('/app/list');
router.prefetch('/login');
}, [router]);
return (
<>
<Box id="home" bg={'myWhite.600'} h={'100vh'} overflowY={'auto'} overflowX={'hidden'}>
<Box position={'fixed'} zIndex={10} top={0} left={0} right={0}>
<Navbar />
</Box>
<Box maxW={'1200px'} pt={'70px'} m={'auto'}>
<Hero />
<Ability />
<Box my={[4, 6]}>
<Choice />
</Box>
</Box>
{feConfigs?.show_git && (
<Box bg={'white'}>
<Footer />
</Box>
)}
</Box>
{homeUrl !== '/' && <Loading bg={'white'} />}
</>
);
};
export async function getServerSideProps(content: any) {
return {
props: {
...(await serviceSideProps(content)),
homeUrl: process.env.HOME_URL || '/'
}
};
}
export default Home;