DEAD_CODE_CLEAN #7

Merged
shafi merged 30 commits from DEAD_CODE_CLEAN into master 2026-09-14 04:32:52 +00:00
8 changed files with 35 additions and 42 deletions
Showing only changes of commit bfb67e626b - Show all commits

View file

@ -1,13 +1,8 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';
import type { TabIconProps } from '@packages/shared';
interface CartIconProps {
focused: boolean;
size: number;
color: string;
}
const CartIcon: React.FC<CartIconProps> = ({ focused, size, color }) => {
const CartIcon: React.FC<TabIconProps> = ({ focused, size, color }) => {
if (focused) {
// Focused state SVG (cart without handle)
return (

View file

@ -1,13 +1,8 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';
import type { TabIconProps } from '@packages/shared';
interface HomeIconProps {
focused: boolean;
size: number;
color: string;
}
const HomeIcon: React.FC<HomeIconProps> = ({ focused, size, color }) => {
const HomeIcon: React.FC<TabIconProps> = ({ focused, size, color }) => {
if (focused) {
// Selected state SVG (filled house)
return (

View file

@ -1,13 +1,8 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';
import type { TabIconProps } from '@packages/shared';
interface MeIconProps {
focused: boolean;
size: number;
color: string;
}
const MeIcon: React.FC<MeIconProps> = ({ focused, size, color }) => {
const MeIcon: React.FC<TabIconProps> = ({ focused, size, color }) => {
if (focused) {
// Selected state SVG (filled user)
return (

View file

@ -1,13 +1,8 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';
import type { TabIconProps } from '@packages/shared';
interface OffersIconProps {
focused: boolean;
size: number;
color: string;
}
const OffersIcon: React.FC<OffersIconProps> = ({ focused, size, color }) => {
const OffersIcon: React.FC<TabIconProps> = ({ focused, size, color }) => {
if (focused) {
// Selected state SVG (filled offer tag)
return (

View file

@ -1,13 +1,8 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';
import type { TabIconProps } from '@packages/shared';
interface StoresIconProps {
focused: boolean;
size: number;
color: string;
}
const StoresIcon: React.FC<StoresIconProps> = ({ focused, size, color }) => {
const StoresIcon: React.FC<TabIconProps> = ({ focused, size, color }) => {
if (focused) {
// Selected state SVG (filled squares)
return (

View file

@ -984,3 +984,20 @@ Excluded: MyTouchableOpacityProps (optional children + extends — different sha
[2026-09-05 11:15:00] COMPLETED Cluster-1 ReactParentComponent unification (11 files + shared def + fallback-ui tsconfig).
Verification: user-ui 106, admin-ui 122, backend 11 (all = baselines); fallback-ui 107 total with zero errors in touched files. Zero leftover local interfaces. Docs: cluster-01 file + types_inventory status section marked resolved.
[2026-09-05 11:20:24] ADD shared TabIconProps for Cluster-2 unification.
=== packages/shared/types/primitives.types.ts ===
- appended:
export interface TabIconProps {
focused: boolean
size: number
color: string
}
[2026-09-05 11:21:00] Cluster-2 unification: replace 6 local tab-icon prop interfaces with shared TabIconProps.
- apps/user-ui/components/icons/{HomeIcon,OffersIcon,CartIcon,StoresIcon,MeIcon}.tsx + packages/ui/src/components/icons/CartIcon.tsx: in each file delete lines 4-8 (local interface + trailing blank line) and add import type { TabIconProps } from '@packages/shared' after the react-native-svg import; update the single annotation React.FC<XxxIconProps> → React.FC<TabIconProps>
- Excluded: nothing — all 6 members verified byte-identical shape, single local use each, no cross-file consumers.
[2026-09-05 11:25:00] COMPLETED Cluster-2 TabIconProps unification (6 files + shared def).
Added shared TabIconProps {focused, size, color} in primitives.types.ts (auto-exported via existing primitives star). Replaced all 6 local interfaces (5 user-ui icons + ui CartIcon), each verified single local use, zero cross-file consumers.
Verification: user-ui 106, admin-ui 122, backend 11 (all = baselines); zero leftover local interfaces. Docs: cluster-02 file + types_inventory status section marked resolved.

View file

@ -23,3 +23,9 @@ export interface IdName {
export interface ReactParentComponent {
children: ReactNode
}
export interface TabIconProps {
focused: boolean
size: number
color: string
}

View file

@ -1,13 +1,8 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';
import type { TabIconProps } from '@packages/shared';
interface CartIconProps {
focused: boolean;
size: number;
color: string;
}
const CartIcon: React.FC<CartIconProps> = ({ focused, size, color }) => {
const CartIcon: React.FC<TabIconProps> = ({ focused, size, color }) => {
if (focused) {
// Focused state SVG (cart without handle)
return (