-
Notifications
You must be signed in to change notification settings - Fork 0
알림 테스트 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
알림 테스트 #11
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -66,6 +66,21 @@ export const useExecutionStore = create<ExecutionState>()( | |||
| partialize: (state) => ({ | ||||
| result: state.result, | ||||
| }), | ||||
| onRehydrateStorage: () => (state, error) => { | ||||
| if (error) { | ||||
| console.error('hydration failed:', error); | ||||
| // persist 실패 시 localStorage 정리 | ||||
| localStorage.removeItem('executejs-execution-storage'); | ||||
|
|
||||
| return; | ||||
| } | ||||
|
|
||||
| if (state) { | ||||
| console.log('hydration success'); | ||||
|
||||
| console.log('hydration success'); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,8 +5,32 @@ import { OutputPanel } from '@/widgets/output-panel'; | |||||||||||||||||||||
| import { useExecutionStore } from '@/features/execute-code'; | ||||||||||||||||||||||
| import { PlayIcon, StopIcon } from '@radix-ui/react-icons'; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| const getInitialCode = (): string => { | ||||||||||||||||||||||
| try { | ||||||||||||||||||||||
| const executionStorage = localStorage.getItem( | ||||||||||||||||||||||
| 'executejs-execution-storage' | ||||||||||||||||||||||
|
Comment on lines
+8
to
+11
|
||||||||||||||||||||||
| const getInitialCode = (): string => { | |
| try { | |
| const executionStorage = localStorage.getItem( | |
| 'executejs-execution-storage' | |
| const EXECUTION_STORAGE_KEY = 'executejs-execution-storage'; | |
| const getInitialCode = (): string => { | |
| try { | |
| const executionStorage = localStorage.getItem( | |
| EXECUTION_STORAGE_KEY |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console.log statements should be removed from production code or replaced with a proper logging mechanism. Consider removing this debug log or using a conditional logger.
| console.log('result from executionStorage:', code); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The storage key 'executejs-execution-storage' is hardcoded here but already defined at line 65. Reference the existing 'name' property from the persist configuration or extract to a constant to avoid duplication.