Skip to content

Commit bd19309

Browse files
committed
Modified gethooksname for remix & nextJS compatibility
1 parent accb2e0 commit bd19309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/controllers/createTree/statePropExtractors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function getHooksNames(elementType: string): { hookName: string; varName:
190190
declarations[2]?.id?.name || // work react application
191191
(Array.isArray(declarations[0]?.id?.elements)
192192
? declarations[0]?.id?.elements[0]?.name
193-
: undefined); //work for nextJS
193+
: undefined); //work for nextJS & Remix
194194
// Push reactHook & varName to statements array
195195
statements.push({ hookName, varName });
196196
}

0 commit comments

Comments
 (0)