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

[Fix] type에 따른 build error #376

Merged
merged 1 commit into from
Oct 31, 2023
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTheme } from '@emotion/react';

import type { UserProfile } from '@shared/__generated__/graphql';
import type { UserProfile } from '@shared/types/UserProfile';
import { Avatar, H3MediumText, HStack, Text } from '@shared/ui-kit';

type NumberVersusProps = {
Expand Down
15 changes: 14 additions & 1 deletion app/src/@shared/types/Coalition.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@ export type Coalition = {
color: string;
};

//ToDo: graphql의 Coalition 타입이 수정되면 삭제할 것
/* ToDo: graphql의 Coalition 타입이 수정되면 삭제할 것
현재 타입
export type Coalition = {
id: number;
name: string;
imgUrl: string;
coverUrl: string;
color: string;
imageUrl: string;
userId: number;
score: number;
slug: string;
};
*/
9 changes: 8 additions & 1 deletion app/src/@shared/types/Promo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@ export type Promo = {
promo: number;
};

//ToDo: graphql의 Coalition 타입이 수정되면 삭제할 것
/* ToDo: graphql의 Coalition 타입이 수정되면 삭제할 것
현재 타입
export type Promo = {
beginAt: string;
promo: number;
userCount: number;
};
*/
20 changes: 20 additions & 0 deletions app/src/@shared/types/UserProfile.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Coalition } from '@shared/types/Coalition';

export type UserProfile = {
id: number;
login: string;
imgUrl?: string | null;
grade: string;
displayname: string;
level: number;
coalition?: Coalition | null;
titles: Array<{
titleId: number;
name: string;
selected: boolean;
createdAt: string;
updatedAt: string;
}>;
};

/* ToDo: graphql의 Coalition 타입이 수정되면 삭제할 것 */
2 changes: 1 addition & 1 deletion app/src/Profile/components/UserProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { truncate } from 'lodash-es';
import { useContext } from 'react';

import { UserProfileContext } from '@/Profile/contexts/UserProfileContext';
import type { Coalition } from '@shared/__generated__/graphql';
import type { Coalition } from '@shared/types/Coalition';
import coalition_black_cover from '@shared/assets/coalition/cover/coalition-black-cover.jpg';
import coalition_gam_cover from '@shared/assets/coalition/cover/coalition-gam-cover.jpg';
import coalition_gon_cover from '@shared/assets/coalition/cover/coalition-gon-cover.jpg';
Expand Down
2 changes: 1 addition & 1 deletion app/src/Profile/contexts/MyUserProfileContext.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createContext } from 'react';

import type { UserProfile } from '@shared/__generated__/graphql';
import type { UserProfile } from '@shared/types/UserProfile';

export const MyUserProfileContext = createContext<UserProfile>(
{} as UserProfile,
Expand Down
2 changes: 1 addition & 1 deletion app/src/Profile/contexts/UserProfileContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext } from 'react';

import type { UserProfile } from '@shared/__generated__/graphql';
import type { UserProfile } from '@shared/types/UserProfile';

export const UserProfileContext = createContext<UserProfile>({} as UserProfile);