Skip to content

Commit e662779

Browse files
committed
Refactor frontend hook directory structure and update activity bar icon
- place `apps/editor/src/views/panel/frontend/hooks/use-panel.ts` in `apps/editor/src/views/panel/frontend/hooks/use-panel/use-panel.ts`, place `apps/editor/src/views/panel/frontend/hooks/use-instructions.ts` in `apps/editor/src/views/panel/frontend/hooks/use-panel/hooks/use-instructions.ts`
1 parent 576323c commit e662779

6 files changed

Lines changed: 22 additions & 15 deletions

File tree

Lines changed: 13 additions & 7 deletions
Loading

‎apps/editor/src/views/panel/frontend/Panel.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { ResponseHistoryItem } from '@shared/types/response-history-item'
2121
import { Layout } from './components/Layout/Layout'
2222
import { ResponsePreviewFooter as UiResponsePreviewFooter } from '@ui/components/editor/panel/ResponsePreviewFooter'
2323
import { RecentDonations as UiRecentDonations } from '@ui/components/editor/panel/RecentDonations/RecentDonations'
24-
import { use_recent_donations } from './hooks/recent-donations'
24+
import { use_recent_donations } from './hooks/use-recent-donations'
2525
import { RecentDonationsFooter } from './components/recent-donations/RecentDonationsFooter'
2626
import { IconButton as UiIconButton } from '@ui/components/editor/common/IconButton'
2727
import { use_modal_manager } from './hooks/use-modal-manager'

apps/editor/src/views/panel/frontend/hooks/use-instructions.ts renamed to apps/editor/src/views/panel/frontend/hooks/use-panel/hooks/use-instructions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState, useEffect } from 'react'
2-
import { BackendMessage, InstructionsState } from '../../types/messages'
3-
import { post_message } from '../utils/post-message'
4-
import { Mode, MODE } from '../../types/main-view-mode'
2+
import { BackendMessage, InstructionsState } from '../../../../types/messages'
3+
import { post_message } from '../../../utils/post-message'
4+
import { Mode, MODE } from '../../../../types/main-view-mode'
55
import { WebPromptType, ApiPromptType } from '@shared/types/prompt-types'
66

77
export const use_instructions = (
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { use_panel } from './use-panel'

apps/editor/src/views/panel/frontend/hooks/use-panel.ts renamed to apps/editor/src/views/panel/frontend/hooks/use-panel/use-panel.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {
33
BackendMessage,
44
FrontendMessage,
55
SetupProgress
6-
} from '../../types/messages'
7-
import { Mode, MODE } from '../../types/main-view-mode'
6+
} from '../../../types/messages'
7+
import { Mode, MODE } from '../../../types/main-view-mode'
88
import { ApiPromptType, WebPromptType } from '@shared/types/prompt-types'
9-
import { post_message } from '../utils/post-message'
10-
import { use_instructions } from './use-instructions'
9+
import { post_message } from '../../utils/post-message'
10+
import { use_instructions } from './hooks/use-instructions'
1111

1212
export const use_panel = (vscode: any) => {
1313
const [active_view, set_active_view] = useState<'home' | 'main'>('home')

apps/editor/src/views/panel/frontend/hooks/recent-donations.ts renamed to apps/editor/src/views/panel/frontend/hooks/use-recent-donations.ts

File renamed without changes.

0 commit comments

Comments
 (0)