Skip to content

Commit 34666cb

Browse files
authored
Merge pull request #49 from pythonkr/refactor/separate-common-package
fix: 빌드 오류 수정 with claude
2 parents 6726a9f + 13f350a commit 34666cb

File tree

7 files changed

+16
-22
lines changed

7 files changed

+16
-22
lines changed

apps/pyconkr-admin/src/components/elements/admin_list_filter.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import { Add, Clear, FilterList, RestartAlt } from "@mui/icons-material";
22
import { Box, Button, Chip, FormControl, IconButton, InputLabel, MenuItem, Select, Stack, TextField } from "@mui/material";
33
import * as React from "react";
44

5-
import BackendAdminAPISchemas from "../../../../../packages/common/src/schemas/backendAdminAPI";
6-
7-
type OpenAPIParameterSchema = BackendAdminAPISchemas.OpenAPIParameterSchema;
8-
type ChoicesResponse = BackendAdminAPISchemas.ChoicesResponse;
5+
import { ChoicesResponse, OpenAPIParameterSchema } from "../../../../../packages/common/src/schemas/backendAdminAPI";
96

107
type AdminListFilterProps = {
118
parameters: OpenAPIParameterSchema[];

apps/pyconkr-admin/src/components/pages/page/editor.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ import { commands } from "@uiw/react-md-editor";
88
import * as React from "react";
99
import { useParams } from "react-router-dom";
1010

11-
// I don't know why, I don't want to know why, I shouldn't have to wonder why,
12-
// but for whatever reason this stupid namespace won't import on Common.Schemas.BackendAdminAPI.PageSectionSchema.
13-
// TODO: FIXME: Remove this hack when the issue is resolved. This is dumb.
14-
import BackendAdminAPISchemas from "../../../../../../packages/common/src/schemas/backendAdminAPI";
11+
import { PageSectionSchema } from "../../../../../../packages/common/src/schemas/backendAdminAPI";
1512
import { muiTheme } from "../../../styles/globalStyles";
1613
import { addErrorSnackbar } from "../../../utils/snackbar";
1714
import { AdminEditor } from "../../layouts/admin_editor";
1815

19-
type SectionType = BackendAdminAPISchemas.PageSectionSchema;
16+
type SectionType = PageSectionSchema;
2017

2118
type CommonSectionEditorPropType = {
2219
disabled?: boolean;

apps/pyconkr-admin/src/components/pages/sitemap/list.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import { enqueueSnackbar, OptionsObject } from "notistack";
2121
import * as React from "react";
2222
import { GroupOptions, ReactSortable, SortableEvent, SortableOptions } from "react-sortablejs";
2323

24-
import BackendAdminAPISchemas from "../../../../../../packages/common/src/schemas/backendAdminAPI";
24+
import { FlattenedSiteMapSchema, NestedSiteMapSchema } from "../../../../../../packages/common/src/schemas/backendAdminAPI";
2525
import { BackendAdminSignInGuard } from "../../elements/admin_signin_guard";
2626
import { AdminEditor } from "../../layouts/admin_editor";
2727

28-
type FlatSiteMap = BackendAdminAPISchemas.FlattenedSiteMapSchema;
28+
type FlatSiteMap = FlattenedSiteMapSchema;
2929
type FlatSiteMapObj = Record<string, FlatSiteMap>;
30-
type NestedSiteMap = BackendAdminAPISchemas.NestedSiteMapSchema;
30+
type NestedSiteMap = NestedSiteMapSchema;
3131
type FlatNestedSiteMap = Record<string, NestedSiteMap>;
3232

3333
const DepthColorMap: React.CSSProperties["backgroundColor"][] = [

apps/pyconkr/src/components/layout/BreadCrumb/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import * as React from "react";
33
import { Link } from "react-router-dom";
44
import * as R from "remeda";
55

6-
import BackendAPISchemas from "../../../../../../packages/common/src/schemas/backendAPI";
6+
import { NestedSiteMapSchema } from "../../../../../../packages/common/src/schemas/backendAPI";
77

88
type BreadCrumbPropType = {
99
title: string;
10-
parentSiteMaps: (BackendAPISchemas.NestedSiteMapSchema | undefined)[];
10+
parentSiteMaps: (NestedSiteMapSchema | undefined)[];
1111
};
1212

1313
export const BreadCrumb: React.FC<BreadCrumbPropType> = ({ title, parentSiteMaps }) => {

apps/pyconkr/src/components/layout/Header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import * as React from "react";
66
import { Link } from "react-router-dom";
77
import * as R from "remeda";
88

9-
import BackendAPISchemas from "../../../../../../packages/common/src/schemas/backendAPI";
9+
import { NestedSiteMapSchema } from "../../../../../../packages/common/src/schemas/backendAPI";
1010
import { useAppContext } from "../../../contexts/app_context";
1111
import { CartBadgeButton } from "../CartBadgeButton";
1212
import LanguageSelector from "../LanguageSelector";
1313
import { SignInButton } from "../SignInButton";
1414
// import { ScanCodeIconButton } from "../UserScanCodeButton";
1515
import { MobileHeader } from "./Mobile/MobileHeader";
1616

17-
type MenuType = BackendAPISchemas.NestedSiteMapSchema;
17+
type MenuType = NestedSiteMapSchema;
1818
type MenuOrUndefinedType = MenuType | undefined;
1919

2020
type NavigationStateType = {

apps/pyconkr/src/components/pages/sponsor_detail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as React from "react";
55
import { useParams } from "react-router-dom";
66
import * as R from "remeda";
77

8-
import BackendAPISchemas from "../../../../../packages/common/src/schemas/backendAPI";
8+
import { SponsorTierSchema } from "../../../../../packages/common/src/schemas/backendAPI";
99
import { useAppContext } from "../../contexts/app_context";
1010
import { PageLayout } from "../layout/PageLayout";
1111

@@ -54,7 +54,7 @@ export const SponsorDetailPage: React.FC = ErrorBoundary.with(
5454
Suspense.with({ fallback: <CenteredLoadingPage /> }, () => {
5555
const { id } = useParams();
5656
const { language, sponsorTiers, setAppContext } = useAppContext();
57-
const sponsors = sponsorTiers?.reduce((acc, tier) => [...acc, ...tier.sponsors], [] as BackendAPISchemas.SponsorTierSchema["sponsors"]);
57+
const sponsors = sponsorTiers?.reduce((acc, tier) => [...acc, ...tier.sponsors], [] as SponsorTierSchema["sponsors"]);
5858
const sponsor = sponsors?.find((s) => s.id === id);
5959

6060
const title = language === "ko" ? "후원사" : "Sponsor";

apps/pyconkr/src/contexts/app_context.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22

3-
import BackendAPISchemas from "../../../../packages/common/src/schemas/backendAPI";
3+
import { NestedSiteMapSchema, SponsorTierSchema } from "../../../../packages/common/src/schemas/backendAPI";
44

55
type LanguageType = "ko" | "en";
66

@@ -9,10 +9,10 @@ export type AppContextType = {
99
shouldShowTitleBanner: boolean;
1010
shouldShowSponsorBanner: boolean;
1111

12-
siteMapNode?: BackendAPISchemas.NestedSiteMapSchema;
13-
sponsorTiers?: BackendAPISchemas.SponsorTierSchema[];
12+
siteMapNode?: NestedSiteMapSchema;
13+
sponsorTiers?: SponsorTierSchema[];
1414
title: string;
15-
currentSiteMapDepth: (BackendAPISchemas.NestedSiteMapSchema | undefined)[];
15+
currentSiteMapDepth: (NestedSiteMapSchema | undefined)[];
1616

1717
setAppContext: React.Dispatch<React.SetStateAction<Omit<AppContextType, "setAppContext">>>;
1818
};

0 commit comments

Comments
 (0)