Skip to content

Commit

Permalink
Merge pull request #3 from junction-asia-2023/feat/Layout
Browse files Browse the repository at this point in the history
feat(layout): add default layout
  • Loading branch information
1ilsang committed Aug 19, 2023
2 parents 8343b61 + 27682cc commit bc12088
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/features/app/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { FunctionComponent } from 'react';

import Layout from '../shared/components/Layout';
import HomeContainer from '../home/Container';

const queryClient = new QueryClient();

const AppContainer: FunctionComponent = () => {
return (
<QueryClientProvider client={queryClient}>
<HomeContainer />
<Layout>
<HomeContainer />
</Layout>
</QueryClientProvider>
);
};
Expand Down
8 changes: 8 additions & 0 deletions src/features/shared/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { FunctionComponent, PropsWithChildren } from 'react';
import '../style/index.scss';

const Layout: FunctionComponent<PropsWithChildren> = ({ children }) => {
return <div className="layout-container">{children}</div>;
};

export default Layout;
6 changes: 5 additions & 1 deletion src/features/shared/style/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ body {
margin: 0;
display: flex;
place-content: center;
min-width: $min-width;
min-height: 100vh;
}

.layout-container {
min-width: 320px;
max-width: 480px;
}
1 change: 0 additions & 1 deletion src/features/shared/style/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import './global';
@import './color';
@import './global.scss';

0 comments on commit bc12088

Please sign in to comment.