Compare commits

..

3 Commits

Author SHA1 Message Date
RustamRu
3ade6f83cc Merge branch 'feat/landing' of ssh://85.143.175.152:222/dry_wash_inc/dry-wash-pl into feat/landing
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2024-11-16 14:24:05 +03:00
RustamRu
897602c471 fix: align footer to bottom (#7) 2024-11-16 14:24:02 +03:00
RustamRu
d2b74a1467 fix: align footer to bottom (#7)
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2024-11-10 12:34:01 +03:00
5 changed files with 17 additions and 28 deletions

View File

@@ -3,19 +3,13 @@ import Sidebar from '../Sidebar';
import Orders from '../Orders'; import Orders from '../Orders';
import Masters from '../Masters'; import Masters from '../Masters';
import React from 'react'; import React from 'react';
import { Navigate, Route, Routes } from 'react-router-dom';
const LayoutArm = () => ( const LayoutArm = ({ currentPage, onSelectPage }) => (
<Flex h='100vh'> <Flex h='100vh'>
<Sidebar /> <Sidebar onSelectPage={onSelectPage} />
<Box flex='1' bg='gray.50'> <Box flex='1' bg='gray.50'>
<Routes> {currentPage === 'orders' && <Orders />}
<Route> {currentPage === 'masters' && <Masters />}
<Route index element={<Navigate to='orders' replace />} />
<Route path='orders' element={<Orders />} />
<Route path='masters' element={<Masters />} />
</Route>
</Routes>
</Box> </Box>
</Flex> </Flex>
); );

View File

@@ -2,9 +2,7 @@ import { Box, Button, Heading, VStack } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import { Divider } from '@chakra-ui/react'; import { Divider } from '@chakra-ui/react';
import i18next from 'i18next'; import i18next from 'i18next';
import { Link } from 'react-router-dom'; const Sidebar = ({ onSelectPage }) => (
const Sidebar = () => (
<Box <Box
borderRight='1px solid black' borderRight='1px solid black'
bg='gray.50' bg='gray.50'
@@ -20,8 +18,7 @@ const Sidebar = () => (
<VStack align='start' spacing='4'> <VStack align='start' spacing='4'>
<Divider /> <Divider />
<Button <Button
as={Link} onClick={() => onSelectPage('orders')}
to='orders'
w='100%' w='100%'
colorScheme='green' colorScheme='green'
variant='ghost' variant='ghost'
@@ -30,8 +27,7 @@ const Sidebar = () => (
</Button> </Button>
<Divider /> <Divider />
<Button <Button
as={Link} onClick={() => onSelectPage('masters')}
to='masters'
w='100%' w='100%'
colorScheme='green' colorScheme='green'
variant='ghost' variant='ghost'

View File

@@ -2,7 +2,9 @@ import React, { useState } from 'react';
import LayoutArm from '../../components/LayoutArm'; import LayoutArm from '../../components/LayoutArm';
const Page = () => { const Page = () => {
return <LayoutArm />; const [currentPage, setCurrentPage] = useState('orders');
return <LayoutArm currentPage={currentPage} onSelectPage={setCurrentPage} />;
}; };
export default Page; export default Page;

View File

@@ -1,5 +1,5 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Box, Container, VStack } from '@chakra-ui/react'; import { Container, VStack } from '@chakra-ui/react';
import { import {
BenefitsSection, BenefitsSection,
Footer, Footer,
@@ -19,14 +19,12 @@ const Page: FC = () => {
bg='white' bg='white'
centerContent centerContent
> >
<VStack w='full' h='full' alignItems='stretch'> <VStack w='full' h='full' alignItems='stretch' flexGrow={1}>
<HeroSection flexShrink={0} /> <HeroSection flexShrink={0} />
<Box flexGrow={1}> <VStack as='main' flexGrow={1}>
<VStack as='main'>
<BenefitsSection /> <BenefitsSection />
<SocialProofSection /> <SocialProofSection />
</VStack> </VStack>
</Box>
<Footer /> <Footer />
</VStack> </VStack>
</Container> </Container>

View File

@@ -16,10 +16,9 @@ const Routers = () => {
<Route path='order-form' element={<OrderForm />} /> <Route path='order-form' element={<OrderForm />} />
<Route path='order-view' element={<OrderView />} /> <Route path='order-view' element={<OrderView />} />
</Route> </Route>
<Route path='/dry-wash/arm/*' element={<Arm />}></Route> <Route path='/dry-wash/arm' element={<Arm />}></Route>
</Routes> </Routes>
</Suspense> </Suspense>
); );
}; };