Normalize interface naming — remove I prefix convention (#255)

* update pr workflow

* interface to types

* use consistent import

* import type syntax

* test plan note
This commit is contained in:
tmshv authored and GitHub committed 2026-02-08 15:57:11 +07:00
1 parent 7ab9147183
commit 9ee9bce197
20 files changed
+130 -100

No files matched your search

+4 -4
View File
@@ -3,9 +3,9 @@ import { MenuContext } from "@/context/MenuContext"
import { Footer } from "../Footer"
import { Content } from "../Content"
import { Breadcrumbs } from "../Breadcrumbs"
import { IBreadcumbsPart, IMenu } from "src/types"
import type { BreadcrumbPart, MenuItem } from "@/types"
import { useRouter } from "next/router"
import { useMobile } from "src/hooks/useMobile"
import { useMobile } from "@/hooks/useMobile"
import { Navigation } from "@/components/Navigation"
import { Box } from "@/ui/Box"
import { AccessibilityButton } from "../AccessibilityButton"
@@ -29,8 +29,8 @@ const Gosuslugi = dynamic(import("../Gosuslugi").then(module => module.Gosuslugi
export type AppProps = {
showAuthor?: boolean
contentStyle?: React.CSSProperties
breadcrumbs?: IBreadcumbsPart[]
menu: IMenu[]
breadcrumbs?: BreadcrumbPart[]
menu: MenuItem[]
children?: React.ReactNode
}
+3 -3
View File
@@ -1,12 +1,12 @@
import s from "./styles.module.css"
import { IBreadcumbsPart } from "src/types"
import type { BreadcrumbPart } from "@/types"
import { Button } from "@/ui/Button"
import { insertBetween } from "src/lib/array"
import { insertBetween } from "@/lib/array"
export type BreadcrumbsProps = {
style?: React.CSSProperties
items: IBreadcumbsPart[]
items: BreadcrumbPart[]
path: string
}
+1 -1
View File
@@ -1,6 +1,6 @@
import s from "./styles.module.css"
import { FileDefinition } from "src/types"
import type { FileDefinition } from "@/types"
import { ext, size } from "src/lib/file"
import Link from "next/link"
import Image from "next/image"
+1 -1
View File
@@ -1,6 +1,6 @@
import s from "./signature.module.css"
import { Sign } from "@/types"
import type { Sign } from "@/types"
import { HiOutlineShieldCheck } from "react-icons/hi"
import * as Tooltip from "@radix-ui/react-tooltip"
+1 -1
View File
@@ -2,7 +2,7 @@ import s from "./filecard.module.css"
import Image from "next/image"
import dynamic from "next/dynamic"
import { FileTokenData, Sign } from "@/types"
import type { FileTokenData, Sign } from "@/types"
import { size, ext } from "@/lib/file"
import { getResizedUrl } from "@/lib/image"
import Link from "next/link"
+3 -3
View File
@@ -1,6 +1,6 @@
import s from "./styles.module.css"
import { IMenu } from "@/types"
import type { MenuItem } from "@/types"
import * as NavigationMenu from "@radix-ui/react-navigation-menu"
import classnames from "classnames/bind"
import { useRouter } from "next/router"
@@ -10,8 +10,8 @@ let cx = classnames.bind(s)
export type MenuProps = {
vertical?: boolean
items: IMenu[]
onItemClick?: (item: IMenu) => void
items: MenuItem[]
onItemClick?: (item: MenuItem) => void
}
export const Menu: React.FC<MenuProps> = ({ vertical = false, onItemClick, items }) => {
+2 -2
View File
@@ -1,13 +1,13 @@
import s from "./styles.module.css"
import { PageMeta } from "../PageMeta"
import { ITag } from "src/types"
import type { Tag } from "@/types"
export type PageProps = {
children?: React.ReactNode
style?: React.CSSProperties
date?: Date
tags: ITag[]
tags: Tag[]
}
export const Page: React.FC<PageProps> = props => (
+3 -2
View File
@@ -1,7 +1,8 @@
import Image from "next/image"
import { PageCardDto } from "@/types"
import type { PageCardDto } from "@/types"
import { CardGrid } from "../CardGrid"
import { Card, CardLayout } from "../Card"
import { Card } from "../Card"
import type { CardLayout } from "../Card"
import { Date } from "./Date"
import { Spacer } from "../Spacer"
import { Box } from "@/ui/Box"
+6 -5
View File
@@ -1,15 +1,16 @@
import s from "./styles.module.css"
import cx from "classnames"
import { dateFormat } from "src/lib/date"
import { ITag } from "src/types"
import { TagList, Direction } from "../TagList"
import { useMobile } from "src/hooks/useMobile"
import { dateFormat } from "@/lib/date"
import type { Tag } from "@/types"
import { TagList } from "../TagList"
import type { Direction } from "../TagList"
import { useMobile } from "@/hooks/useMobile"
export type PageMetaProps = {
style?: React.CSSProperties
date?: Date
tags?: ITag[]
tags?: Tag[]
}
export const PageMeta: React.FC<PageMetaProps> = props => {
+6 -6
View File
@@ -1,7 +1,7 @@
import s from "./styles.module.css"
import cx from "classnames"
import { ITag } from "src/types"
import type { Tag } from "@/types"
import { Button } from "@/ui/Button"
const directionClass = {
@@ -11,13 +11,13 @@ const directionClass = {
export type Direction = "horizontal" | "vertical"
export type TagProps = {
export type TagItemProps = {
children?: React.ReactNode
href: string
direction: Direction
}
export const Tag: React.FC<TagProps> = props => (
export const TagItem: React.FC<TagItemProps> = props => (
<li>
<Button
href={props.href}
@@ -30,20 +30,20 @@ export const Tag: React.FC<TagProps> = props => (
)
export type TagListProps = {
items: ITag[]
items: Tag[]
direction: Direction
}
export const TagList: React.FC<TagListProps> = props => (
<ul className={cx(s.tags, directionClass[props.direction])}>
{props.items.map(x => (
<Tag
<TagItem
key={x.slug}
href={x.href}
direction={props.direction}
>
{x.name}
</Tag>
</TagItem>
))}
</ul>
)