Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…024-mouda into feature/#707
  • Loading branch information
ss0526100 committed Oct 23, 2024
2 parents d24e407 + a72e019 commit b0093bb
Show file tree
Hide file tree
Showing 140 changed files with 2,685 additions and 1,112 deletions.
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`);
};
3 changes: 2 additions & 1 deletion frontend/src/apis/gets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '@_types/index';
import {
GetBet,
GetBetDetail,
GetBets,
GetChamyoAll,
GetChamyoMine,
Expand Down Expand Up @@ -233,6 +234,6 @@ export const getBetResult = async (betId: number) => {
`/bet/${betId}/result`,
);

const json = await response.json();
const json: GetBetDetail = await response.json();
return json.data.nickname;
};
6 changes: 6 additions & 0 deletions frontend/src/apis/responseTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ export interface GetBet {
data: BetDetail;
}

export interface GetBetDetail {
data: {
nickname: string;
};
}

export interface PostBet {
data: {
betId: number;
Expand Down
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 added frontend/src/common/assets/fonts/DNFBitBitTTF.ttf
Binary file not shown.
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.
14 changes: 14 additions & 0 deletions frontend/src/common/font.style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +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 @@ -75,6 +77,18 @@ const fonts = css`
font-display: swap;
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});
}
`;

export default fonts;
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,8 +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>
);
},
};
Loading

0 comments on commit b0093bb

Please sign in to comment.