Skip to content

Commit

Permalink
Merge branch 'develop-frontend' of https://github.com/woowacourse-tea…
Browse files Browse the repository at this point in the history
…ms/2024-mouda into feature/#675
  • Loading branch information
ss0526100 committed Oct 23, 2024
2 parents 18cc3cc + e23c788 commit afbcb6b
Show file tree
Hide file tree
Showing 101 changed files with 1,407 additions and 645 deletions.
2 changes: 1 addition & 1 deletion frontend/public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ self.addEventListener('notificationclick', function (event) {
// console.log('[firebase-messaging-sw.js] 알림이 클릭되었습니다.');

// 알림 데이터를 가져오기
const link = event.notification.data.FCM_MSG.notification.click_action;
const link = event.notification.data.FCM_MSG.data.link;

event.notification.close(); // 알림 닫기

Expand Down
16 changes: 2 additions & 14 deletions frontend/src/apis/auth.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
import ApiClient from './apiClient';

export const kakaoOAuth = async (code: string) => {
const response = await ApiClient.postWithoutAuth('/auth/kakao/oauth', {
await ApiClient.postWithAuth('/auth/kakao', {
code,
});
return response.json();
};
export const appleOAuth = async (
code: string,
memberId: string | null = null,
) => {
const response = await ApiClient.postWithoutAuth('/auth/apple/oauth', {
code,
memberId,
});
return response.json();
};

export const googleOAuth = async (
idToken: string,
memberId: string | null = null,
) => {
const response = await ApiClient.postWithoutAuth('/auth/google/oauth', {
const response = await ApiClient.postWithoutAuth('/auth/google', {
idToken,
memberId,
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/apis/deletes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const deleteCancelChamyo = async (moimId: number) => {
};

export const deleteMyInfo = async () => {
await ApiClient.deleteWithLastDarakbangId(`/auth`);
await ApiClient.deleteWithAuth(`/auth`);
};
4 changes: 4 additions & 0 deletions frontend/src/common/assets/apple_cirecle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions frontend/src/common/assets/happy_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions frontend/src/common/assets/kakaoCircleOuathLogin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions frontend/src/common/assets/main_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions frontend/src/common/assets/missing_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions frontend/src/common/font.style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import bitbit from './assets/fonts/DNFBitBitTTF.ttf';
import { css } from '@emotion/react';
import partialSansKRRegular from './assets/fonts/PartialSansKR/PartialSansKR-Regular.woff2';
import pretendardBlackWoff2 from './assets/fonts/woff2-subset/Pretendard-Black.subset.woff2';
import pretendardBoldWoff2 from './assets/fonts/woff2-subset/Pretendard-Bold.subset.woff2';
import pretendardExtraBoldWoff2 from './assets/fonts/woff2-subset/Pretendard-ExtraBold.subset.woff2';
Expand Down Expand Up @@ -77,6 +78,13 @@ const fonts = css`
src: url(${pretendardThinWoff2}) format('woff2');
}
@font-face {
font-family: PartialSansKR;
font-weight: 400;
font-display: swap;
src: url(${partialSansKRRegular}) format('woff2');
}
@font-face {
font-family: bitbit;
src: url(${bitbit});
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/common/getRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,15 @@ const GET_ROUTES = {
getNowDarakbangRoute() + '/bet/' + betId + '/result',
setting: () => getNowDarakbangRoute() + '/my-page/setting',
},
default: {
notFound: '/*',
main: '/',
home: '/home',
kakaoSelection: '/oauth-migration',
oAuthSelection: '/oauth-select',
resultMigration: '/oauth-migration',
oAuthGoogle: '/oauth',
oAuth: '/oauth/:provider',
},
};
export default GET_ROUTES;
2 changes: 2 additions & 0 deletions frontend/src/common/theme/theme.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface Typography {
small: SerializedStyles;
Tiny: SerializedStyles;
tag: SerializedStyles;
partialSansKR: SerializedStyles;
}

export interface ColoredTypography {
Expand All @@ -66,6 +67,7 @@ export interface ColoredTypography {
small: (fontColor: string | SerializedStyles) => SerializedStyles;
Tiny: (fontColor: string | SerializedStyles) => SerializedStyles;
tag: (fontColor: string | SerializedStyles) => SerializedStyles;
partialSansKR: (fontColor: string | SerializedStyles) => SerializedStyles;
}
export interface Layout {
default: SerializedStyles;
Expand Down
52 changes: 29 additions & 23 deletions frontend/src/common/theme/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,173 +5,179 @@ const typography: Typography = {
h1: css`
font-family: Pretendard;
font-size: 4.8rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 5.8rem;
`,
h2: css`
font-family: Pretendard;
font-size: 4rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 4.8rem;
`,
h3: css`
font-family: Pretendard;
font-size: 3.2rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 3.8rem;
`,
h4: css`
font-family: Pretendard;
font-size: 2.8rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 3.4rem;
`,
h5: css`
font-family: Pretendard;
font-size: 2.4rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 2.8rem;
`,

s1: css`
font-family: Pretendard;
font-size: 1.8rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 2.8rem;
`,
s2: css`
font-family: Pretendard;
font-size: 1.6rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 2.4rem;
`,

b1: css`
font-family: Pretendard;
font-size: 1.6rem;
font-style: normal;
font-weight: 500;
font-style: normal;
line-height: 2.4rem;
`,
b2: css`
font-family: Pretendard;
font-size: 1.6rem;
font-style: normal;
font-weight: 400;
font-style: normal;
line-height: 2.4rem;
`,
b3: css`
font-family: Pretendard;
font-size: 1.4rem;
font-style: normal;
font-weight: 500;
font-style: normal;
line-height: 2rem;
`,
b4: css`
font-family: Pretendard;
font-size: 1.4rem;
font-style: normal;
font-weight: 400;
font-style: normal;
line-height: 2rem;
`,

c1: css`
font-family: Pretendard;
font-size: 1.2rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 1.6rem;
`,
c2: css`
font-family: Pretendard;
font-size: 1.2rem;
font-style: normal;
font-weight: 400;
font-style: normal;
line-height: 1.6rem;
`,
c3: css`
font-family: Pretendard;
font-size: 1rem;
font-style: normal;
font-weight: 400;
font-style: normal;
line-height: 1.4rem;
`,

label: css`
font-family: Pretendard;
font-size: 1.2rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 1.6rem;
text-transform: uppercase;
`,

ButtonFont: css`
font-family: Inter;
font-size: 2.4rem;
font-style: normal;
font-weight: 600;
font-style: normal;
line-height: 2.8rem;
`,

Typeface: css`
font-family: Inter;
font-size: 1.6rem;
font-style: normal;
font-weight: 400;
font-style: normal;
line-height: 2.4rem;
`,

Giant: css`
font-family: Pretendard;
font-size: 1.8rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 2.4rem;
`,

Large: css`
font-family: Pretendard;
font-size: 1.6rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 2rem;
`,
Medium: css`
font-family: Pretendard;
font-size: 1.4rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 1.6rem;
`,
small: css`
font-family: Pretendard;
font-size: 1.2rem;
font-style: normal;
font-weight: 700;
font-style: normal;
line-height: 1.6rem;
`,
Tiny: css`
font-family: Pretendard;
font-size: 1rem;
font-style: normal;
font-weight: 800;
font-style: normal;
line-height: 1.2rem;
`,
tag: css`
font-family: Pretendard;
font-size: 1.2rem;
font-style: normal;
font-weight: 600;
font-style: normal;
line-height: 130%;
`,
partialSansKR: css`
font-family: PartialSansKR;
font-size: 2rem;
font-weight: 400;
font-style: normal;
`,
};

export default typography;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function BackArrowButton(props: BackArrowButtonProps) {
const { ...rest } = props;

return (
<button {...rest} css={S.button}>
<button {...rest} css={S.button} aria-label="뒤로가기">
<BackArrowIcon />
</button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import { SerializedStyles, css } from '@emotion/react';

export const name = ({ font }: { font: string | SerializedStyles }) => css`
${font}
max-width: 40vw;
overflow-x: hidden;
max-width: 40vw;
text-overflow: ellipsis;
white-space: nowrap;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Meta, StoryObj } from '@storybook/react';

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

const meta: Meta<typeof HappyFallback> = {
component: HappyFallback,
};

export default meta;
type Story = StoryObj<typeof HappyFallback>;

export const Default: Story = {
args: { text: '없어요' },

decorators: (Story) => {
return (
<div
css={css`
width: 1000px;
height: 1000px;
border: solid 1px;
`}
>
<Story />
</div>
);
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { SerializedStyles, css } from '@emotion/react';

export const container = ({
backgroundColor,
}: {
backgroundColor?: string | SerializedStyles;
}) => css`
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
${backgroundColor ? `background-color: ${backgroundColor};` : ''}
min-width: 30rem;
min-height: 30rem;
& > * {
text-align: center;
white-space: pre-line;
}
`;

export const image = css`
width: 100%;
max-width: 40rem;
height: 100%;
max-height: 40rem;
`;
Loading

0 comments on commit afbcb6b

Please sign in to comment.