Skip to content

Commit

Permalink
EmployeeWebClient - update PageWrapper component's name
Browse files Browse the repository at this point in the history
  • Loading branch information
bartstc committed Oct 31, 2022
1 parent 5b4dc7d commit 46c3958
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/AddBooking/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Box } from '@chakra-ui/react';

import { PageWrapper } from 'shared/Layout/Page';
import { PageContainer } from 'shared/Layout/Page';

import { AddBookingForm, useAddBookingNotification } from 'modules/booking/presentation';
import { useAddBooking } from 'modules/booking/infrastructure/command';
Expand All @@ -15,7 +15,7 @@ const AddBooking = () => {
const { showFailureNotification, showSuccessNotification } = useAddBookingNotification();

return (
<PageWrapper maxW='1300px'>
<PageContainer maxW='1300px'>
<Header />
<Box w='100%'>
<AddBookingForm
Expand All @@ -31,7 +31,7 @@ const AddBooking = () => {
isLoading={isLoading}
/>
</Box>
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Booking/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { PageWrapper } from 'shared/Layout/Page';
import { PageContainer } from 'shared/Layout/Page';

import { withErrorBoundary } from 'shared/ErrorBoundary';

Expand All @@ -15,10 +15,10 @@ export interface BookingPageQueryParams {

const Booking = () => {
return (
<PageWrapper maxW='1600px' spacing={4}>
<PageContainer maxW='1600px' spacing={4}>
<Header />
<CustomCalendar />
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Customers/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { PageWrapper } from 'shared/Layout';
import { PageContainer } from 'shared/Layout';
import { withErrorBoundary } from 'shared/ErrorBoundary';
import { CustomersCollection } from 'modules/customers/presentation';
import { CollectionContainer } from 'shared/Collection';
Expand All @@ -10,13 +10,13 @@ import { Panel } from './Panel';

const Customers = () => {
return (
<PageWrapper>
<PageContainer>
<Header />
<CollectionContainer>
<Panel />
<CustomersCollection />
</CollectionContainer>
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ import { VStack } from '@chakra-ui/react';
import { Outlet } from 'react-router-dom';

import { withErrorBoundary } from 'shared/ErrorBoundary';
import { PageWrapper } from 'shared/Layout';
import { PageContainer } from 'shared/Layout';
import { Spinner } from 'shared/Spinner';

import { Header } from './Header';

const Dashboard = () => {
return (
<PageWrapper spacing={{ base: 6, md: 10 }}>
<PageContainer spacing={{ base: 6, md: 10 }}>
<Header />
<VStack w='100%' maxW='1200px' pb={{ base: 4, md: 10 }}>
<Suspense fallback={<Spinner />}>
<Outlet />
</Suspense>
</VStack>
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Employees/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { VStack } from '@chakra-ui/react';

import { PageWrapper } from 'shared/Layout/Page';
import { PageContainer } from 'shared/Layout/Page';
import { withErrorBoundary } from 'shared/ErrorBoundary';

import { EmployeesCollection } from 'modules/employees/presentation';
Expand All @@ -11,13 +11,13 @@ import { Panel } from './Panel';

const Employees = () => {
return (
<PageWrapper>
<PageContainer>
<Header />
<VStack w='100%' maxW='1200px' pb={{ base: 4, md: 10 }}>
<Panel />
<EmployeesCollection />
</VStack>
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Offers/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React from 'react';
import { VStack } from '@chakra-ui/react';

import { PageWrapper } from 'shared/Layout/Page';
import { PageContainer } from 'shared/Layout/Page';
import { OffersCollection } from 'modules/offers/presentation';

import { Header } from './Header';
import { OffersCollectionToolbox } from '../../modules/offers/presentation/OffersCollection/OffersCollectionToolbox';

const Offers = () => {
return (
<PageWrapper>
<PageContainer>
<Header />
<VStack w='100%' maxW='1200px' pb={{ base: 4, md: 10 }}>
<OffersCollectionToolbox />
<OffersCollection />
</VStack>
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Schedule/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useScheduleQuery } from 'modules/schedules/infrastructure/query';
import { RangeWeekDatesProvider } from 'modules/schedules/presentation';
import { useFacilityContextSelector } from 'modules/context';

import { PageWrapper } from 'shared/Layout/Page';
import { PageContainer } from 'shared/Layout/Page';
import { withErrorBoundary } from 'shared/ErrorBoundary';
import { FormattedDate } from 'shared/Date';
import { IconButton } from 'shared/Button';
Expand Down Expand Up @@ -62,7 +62,7 @@ const Schedule = () => {
}, [startTime, endTime]);

return (
<PageWrapper maxW='1600px'>
<PageContainer maxW='1600px'>
<Header schedule={schedule} />
<VStack w='100%' spacing={0}>
<SimpleGrid w='100%' columns={3} spacingX={4}>
Expand Down Expand Up @@ -100,7 +100,7 @@ const Schedule = () => {
<AvailableEmployeesGrid isInRange={isInRange} weekDates={weekDates} />
</RangeWeekDatesProvider>
</VStack>
</PageWrapper>
</PageContainer>
);
};

Expand Down
6 changes: 3 additions & 3 deletions employee-web-client/src/pages/Schedules/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import React from 'react';
import { VStack } from '@chakra-ui/react';

import { PageWrapper } from 'shared/Layout/Page';
import { PageContainer } from 'shared/Layout/Page';

import { SchedulesCollection } from 'modules/schedules/presentation';

import { Header } from './Header';

const Schedules = () => {
return (
<PageWrapper>
<PageContainer>
<Header />
<VStack w='100%' maxW='1200px' pb={{ base: 4, md: 10 }}>
<SchedulesCollection />
</VStack>
</PageWrapper>
</PageContainer>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface IProps extends StackProps {
children: ReactNode;
}

const PageWrapper = ({ children, ...props }: IProps) => {
const PageContainer = ({ children, ...props }: IProps) => {
return (
<VStack
spacing={{ base: 10, md: 16 }}
Expand All @@ -22,4 +22,4 @@ const PageWrapper = ({ children, ...props }: IProps) => {
);
};

export { PageWrapper };
export { PageContainer };
2 changes: 1 addition & 1 deletion employee-web-client/src/shared/Layout/Page/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { PageWrapper } from './PageWrapper';
export { PageContainer } from './PageContainer';
export { PageHeader } from './PageHeader';
export { PageDescription } from './PageDescription';
export { PageHeading } from './PageHeading';
Expand Down
2 changes: 1 addition & 1 deletion employee-web-client/src/shared/Layout/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { Layout } from './Layout';
export { PageWrapper, PageHeader, PageDescription, PageHeading, PageSubheading } from './Page';
export { PageContainer, PageHeader, PageDescription, PageHeading, PageSubheading } from './Page';

0 comments on commit 46c3958

Please sign in to comment.