Skip to content

Commit

Permalink
👽 interface 변경
Browse files Browse the repository at this point in the history
(cherry picked from commit e113b6ff0a4b55377cdda4a5f4a2c4f1d61e9765)
  • Loading branch information
SeoYeonii committed Aug 12, 2023
1 parent 554b94a commit 0c05763
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/interface/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export const PROFILE_TAB_INFOS: {
},
{
label: "저장한 법령",
value: "law",
value: "statute",
},
];
6 changes: 3 additions & 3 deletions src/interface/search.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const SEARCH_TAB_TYPES = ["prec", "law"] as const;
const SEARCH_TAB_TYPES = ["prec", "statute"] as const;
export type SearchTabType = (typeof SEARCH_TAB_TYPES)[number];
export const SEARCH_TAB_INFOS: {
label: string;
Expand All @@ -10,7 +10,7 @@ export const SEARCH_TAB_INFOS: {
},
{
label: "현행 법령",
value: "law",
value: "statute",
},
];

Expand Down Expand Up @@ -87,7 +87,7 @@ interface LawAddendum {
부칙내용: string[];
}
interface LawDetailData {
type: "law";
type: "statute";
// 법령 데이터
기본정보: {
법령ID: number;
Expand Down
6 changes: 3 additions & 3 deletions src/interface/searchDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SearchTabType } from "./search";

export type DetailTabType<T extends SearchTabType> = T extends "prec"
? "ai" | "prec"
: "ai" | "law";
: "ai" | "statute";
export const DETAIL_TAB_INFOS: {
[key in SearchTabType]: { label: string; value: DetailTabType<key> }[];
} = {
Expand All @@ -16,14 +16,14 @@ export const DETAIL_TAB_INFOS: {
value: "prec",
},
],
law: [
statute: [
{
label: "쉬운 법령",
value: "ai",
},
{
label: "법령 원문",
value: "law",
value: "statute",
},
],
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SearchDetail/components/TabPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const TabPanel = ({
/>
</>
)}
{data?.type === "law" && (
{data?.type === "statute" && (
<>
<Box className="title-container">
<Box className="title">{`현행 법령[시행 ${(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/SearchDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const SearchDetail = (): ReactElement => {
className="fallback-container"
sx={{
display:
(mainStore.selectedTab === "prec" ? "prec" : "law") !==
(mainStore.selectedTab === "prec" ? "prec" : "statute") !==
selectedTab
? "none !important"
: "flex",
Expand All @@ -222,7 +222,7 @@ const SearchDetail = (): ReactElement => {
<TabPanel
selectedSearchTab={mainStore.selectedTab}
selectedValue={selectedTab}
value={mainStore.selectedTab === "prec" ? "prec" : "law"}
value={mainStore.selectedTab === "prec" ? "prec" : "statute"}
id={id ?? ""}
setTitle={setTitle}
/>
Expand Down

0 comments on commit 0c05763

Please sign in to comment.