Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatPage, MainPage, PleasePage페이지를 ListLayoutPage로 공통화 #593

Merged
merged 7 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions frontend/src/common/assets/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/common/reset.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const reset = css`

body {
position: relative;
overflow-y: scroll;
${layout.default}
margin: 0 auto;
line-height: 1;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 22 additions & 0 deletions frontend/src/layouts/DefaultPageLayout/DefaultPageLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { PropsWithChildren } from 'react';
import { useTheme } from '@emotion/react';
import FixedCreateButtonWrapper from '@_layouts/components/FixedCreationButtonWrapper/FixedCreateButtonWrapper';
import DefaultPageMain from './DefaultPageMain/DefaultPageMain';
import * as S from './DefaultpageLayout.style';
import DoubleTriHeader from '@_layouts/components/DoubleTriHeader/DoubleTriHeader';
import TriSectionHeader from '@_layouts/components/TriSectionHeader/TriSectionHeader';

function DefaultPageLayout(props: PropsWithChildren) {
const { children } = props;

const theme = useTheme();

return <div css={S.containerStyle({ theme })}>{children}</div>;
}

DefaultPageLayout.DoubleTriHeader = DoubleTriHeader;
DefaultPageLayout.TriHeader = TriSectionHeader;
DefaultPageLayout.Main = DefaultPageMain;
DefaultPageLayout.ListPageFixedButtonWrapper = FixedCreateButtonWrapper;

export default DefaultPageLayout;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as S from './HomeMain.style';
import * as S from './DefaultPageMain.style';

import { PropsWithChildren } from 'react';

export default function HomeMain(props: PropsWithChildren) {
export default function DefaultPageMain(props: PropsWithChildren) {
const { children } = props;

return <main css={S.mainStyle}>{children}</main>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { NAVIGATION_BAR_HEIGHT } from '@_constants/styles';
import { css, Theme } from '@emotion/react';

export const listLayout = ({ theme }: { theme: Theme }) => css`
export const containerStyle = ({ theme }: { theme: Theme }) => css`
min-height: calc(100vh - ${NAVIGATION_BAR_HEIGHT});
margin-bottom: ${NAVIGATION_BAR_HEIGHT};
background-color: ${theme.colorPalette.grey[100]};
`;
9 changes: 0 additions & 9 deletions frontend/src/layouts/HomeLayout.tsx/HomeLayout.style.ts

This file was deleted.

21 changes: 0 additions & 21 deletions frontend/src/layouts/HomeLayout.tsx/HomeLayout.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions frontend/src/layouts/ListLayout/ListLayout.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions frontend/src/layouts/ListLayout/ListMain/ListMain.style.ts

This file was deleted.

8 changes: 0 additions & 8 deletions frontend/src/layouts/ListLayout/ListMain/ListMain.tsx

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions frontend/src/layouts/PleaseLayout/PleaseHeader/PleaseHeader.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions frontend/src/layouts/PleaseLayout/PleaseLayout.style.ts

This file was deleted.

20 changes: 0 additions & 20 deletions frontend/src/layouts/PleaseLayout/PleaseLayout.tsx

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions frontend/src/layouts/PleaseLayout/PleaseMain/PleaseMain.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/src/layouts/SelectLayout/SelectLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as S from './SelectLayout.style';

import { PropsWithChildren } from 'react';
import SelectBottomWrapper from './SelectBottomWrapper/SelectBottomWrapper';
import SelectContentContainer from './SelectContentContainer/SelectContentContainer';
import StickyTriSectionHeader from '@_layouts/components/StickyTriSectionHeader/StickyTriSectionHeader';
import ListContent from '@_layouts/components/ListContent/ListContent';

function SelectLayout(props: PropsWithChildren) {
const { children } = props;
Expand All @@ -12,7 +12,7 @@ function SelectLayout(props: PropsWithChildren) {
}

SelectLayout.Header = StickyTriSectionHeader;
SelectLayout.ContentContainer = SelectContentContainer;
SelectLayout.ContentContainer = ListContent;
SelectLayout.BottomButtonWrapper = SelectBottomWrapper;

export default SelectLayout;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DISPLAY_MAX_WIDTH } from '@_constants/styles';
import { css } from '@emotion/react';

export const headerStyle = css`
position: fixed;
position: sticky;
top: 0;

display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { PropsWithChildren } from 'react';
import * as S from './HomeHeader.style';
import * as S from './DoubleTriHeader.style';
import StickyTriSectionHeader from '@_layouts/components/StickyTriSectionHeader/StickyTriSectionHeader';

export default function HomeHeader(props: PropsWithChildren) {
export default function DoubleTriHeader(props: PropsWithChildren) {
const { children } = props;

return <header css={S.headerStyle}>{children}</header>;
}

HomeHeader.Top = StickyTriSectionHeader;
DoubleTriHeader.Top = StickyTriSectionHeader;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PropsWithChildren } from 'react';
import * as S from './PleaseFixedButtonWrapper.style';
import * as S from './FixedBottomButtonWrapper.style';

export default function PleaseFixedButtonWrapper(props: PropsWithChildren) {
export default function FixedBottomButtonWrapper(props: PropsWithChildren) {
const { children } = props;

return <div css={S.fixedWrapperStyle}>{children}</div>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PropsWithChildren } from 'react';
import * as S from './HomeFixedButtonWrapper.style';
import * as S from './FixedCreationButtonWrapper.style';

export default function HomeFixedButtonWrapper(props: PropsWithChildren) {
export default function FixedCreateButtonWrapper(props: PropsWithChildren) {
const { children } = props;

return <div css={S.fixedWrapperStyle}>{children}</div>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from '@emotion/react';

export const cardListSection = css`
export const ListSection = css`
display: flex;
flex-direction: column;
gap: 1.2rem;
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/layouts/components/ListContent/ListContent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PropsWithChildren } from 'react';
import * as S from './ListContent.style';

export default function ListContent(props: PropsWithChildren) {
const { children } = props;

return <div css={S.ListSection}>{children}</div>;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { NAVIGATION_BAR_HEIGHT } from '@_constants/styles';
import POLICES from '@_constants/poclies';

import { css } from '@emotion/react';

export const navigationBarWrapper = css`
position: fixed;
z-index: ${POLICES.footerZIndex};
position: sticky;
bottom: 0;

width: 100%;
height: ${NAVIGATION_BAR_HEIGHT};
`;
Loading
Loading