Skip to content

Commit f756ae0

Browse files
AlexVOiceoverclaude
andcommitted
refactor: remove unnecessary single-export barrel files
- Remove barrel files with only a single export to reduce indirection - Update imports to point directly to source files - Keep barrel files that export from multiple subdirectories - Simplify codebase by reducing unnecessary abstraction layers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a01a5b2 commit f756ae0

File tree

15 files changed

+33
-40
lines changed

15 files changed

+33
-40
lines changed

src/components/layout/MainPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { StatementList } from '@/features/statements/components';
1111
import { useEntries } from '@/features/statements';
1212
import { Mail } from 'lucide-react';
13-
import { StatementWizard } from '@/features/wizard';
13+
import StatementWizard from '@/features/wizard/components/StatementWizard';
1414
import { ShareEmailModal } from '@/components/modals';
1515
// import TestStatementButton from '@/components/debug/TestButton';
1616
import Footer from './Footer';

src/components/layout/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* Layout Components Module
2+
* Barrel file for layout components
33
*
4-
* Provides the main structural components for page layout,
5-
* including the overall app container, header, and footer.
4+
* Provides unified access to structural page components
5+
* including header, footer, and main content containers.
66
*/
77

88
export { default as Header } from './Header';

src/components/modals/UserDataModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Button } from '@/components/ui/Button';
77
import { Save, X, User, Mail, Award, Edit2, LogOut } from 'lucide-react';
88
import { validateEmail } from '@/lib/utils/validateEmail';
99
import { QuestionCounter } from '@/components/ui';
10-
import { ProgressWithFeedback } from '@/features/progress';
10+
import ProgressWithFeedback from '@/features/progress/components/ProgressWithFeedback';
1111

1212
interface UserDataModalProps {
1313
onOpenChange: (open: boolean) => void;

src/components/modals/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* Modal Components Module
2+
* Barrel file for modal components
33
*
4-
* Provides reusable modal dialog components for various purposes
5-
* throughout the application.
4+
* Provides unified access to modal dialog components
5+
* for various purposes throughout the application.
66
*/
77

88
export { default as GratitudeModal } from './GratitudeModal';

src/components/ui/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* UI Components Module
2+
* Barrel file for UI components
33
*
4-
* Provides reusable UI components that can be used across the application.
5-
* These components are the building blocks for more complex components.
4+
* Provides unified access to reusable UI components
5+
* that serve as building blocks across the application.
66
*/
77

88
// Export individual UI components
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
/**
2+
* Barrel file for auth hooks exports
3+
*
4+
* Consolidates auth hook exports for cleaner imports.
5+
*/
6+
17
export * from './useAuth';

src/features/auth/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* Auth Feature Module
2+
* Barrel file for auth feature
33
*
4-
* Centralizes authentication-related functionality including
5-
* context, providers, components, and utilities.
4+
* Provides unified access to authentication-related functionality
5+
* including context, providers, hooks, and components.
66
*/
77

88
// Re-export context and provider

src/features/help/hooks/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/features/help/index.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
/**
2-
* Help Center Module - Barrel file
2+
* Barrel file for help feature
33
*
4-
* This file serves as a centralized export point for all Help Center components and hooks.
5-
* It enables clean imports throughout the application by providing a single entry point
6-
* without requiring consumers to know the internal file structure.
7-
*
8-
* Usage:
9-
* import { HelpProvider, HelpButton, useHelp } from '@/features/help';
4+
* Provides unified access to help center functionality
5+
* including context, providers, hooks, and components.
106
*/
117

128
export { HelpProvider } from './context/HelpProvider';
13-
export { useHelp } from './hooks';
9+
export { useHelp } from './hooks/useHelp';
1410
export { HelpButton, HelpCenter, WelcomePanel } from './components';

src/features/progress/components/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)