Skip to content

Commit

Permalink
fix: landing page margin error
Browse files Browse the repository at this point in the history
  • Loading branch information
HoreKk committed Jan 11, 2024
1 parent 18fb73b commit 3ebf7a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
23 changes: 11 additions & 12 deletions webapp/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,33 @@ export default function Home() {
const [onBoardingItemIndex, setOnBoardingItemIndex] = useState(0);

return (
<Box pt={24} h="full">
<Flex flexDir="column" h="full" justifyContent="space-between">
<Image
src={onBoardingItems[onBoardingItemIndex]?.image}
alt={onBoardingItems[onBoardingItemIndex]?.title}
w="full"
my="auto"
h="350px"
objectPosition="bottom"
objectFit="cover"
/>
<Box w="full" px={6}>
<Box w="full" px={6} mb={6}>
<Flex
px={6}
py={8}
h="45vh"
flexDir="column"
h="45vh"
borderRadius="3xl"
textAlign="center"
background="linear-gradient(217deg, rgba(252, 252, 253, 0.50) -0.01%, rgba(252, 252, 253, 0.30) 100%)"
>
<Heading as="h2" fontSize="xl" fontWeight="semibold">
{onBoardingItems[onBoardingItemIndex]?.title}
</Heading>
<Text mt={4} fontSize="sm">
<Text my={4} fontSize="sm">
{onBoardingItems[onBoardingItemIndex]?.description}
</Text>
<Flex flexDir="column" mt="auto" mx="auto">
<Button onClick={() => router.push("/login")}>Connexion</Button>
<Flex
bgColor="white"
mt={5}
Expand All @@ -91,19 +91,18 @@ export default function Home() {
w="24px"
h="24px"
onClick={() => {
if (onBoardingItemIndex !== onBoardingItems.length - 1)
if (onBoardingItemIndex !== onBoardingItems.length - 1) {
setOnBoardingItemIndex((prev) => prev + 1);
} else {
router.push("/login");
}
}}
color={
onBoardingItemIndex === onBoardingItems.length - 1
? "gray.300"
: "primary.500"
}
color="primary.500"
/>
</Flex>
</Flex>
</Flex>
</Box>
</Box>
</Flex>
);
}
1 change: 0 additions & 1 deletion webapp/src/payload/payload.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from "path";
import { env } from "~/env";
import { buildConfig } from "payload/config";
import { postgresAdapter } from "@payloadcms/db-postgres";
import { slateEditor } from "@payloadcms/richtext-slate";
Expand Down

0 comments on commit 3ebf7a2

Please sign in to comment.