Skip to content
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

fix: webpack error if dbName or enumName is set #7184

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Conversation

AlessioGr
Copy link
Member

Something like this:

  {
    name: 'select',
    type: 'select',
    dbName: ({ tableName }) => `${tableName}_customSelect`,
    enumName: 'selectEnum',
    hasMany: true,
    options: ['a', 'b', 'c'],
},

caused the "Functions cannot be passed directly to Client Components" error, as the dbName function was sent to the client.

Now, you can run pnpm dev database again without it erroring

@AlessioGr AlessioGr enabled auto-merge (squash) July 17, 2024 00:49
@AlessioGr AlessioGr changed the title fix: webpack error if dbName or enumName was set fix: webpack error if dbName or enumName is set Jul 17, 2024
@AlessioGr AlessioGr merged commit 8fdd88b into beta Jul 17, 2024
47 checks passed
@AlessioGr AlessioGr deleted the fix/dbName-enumName branch July 17, 2024 01:02
paulpopus pushed a commit that referenced this pull request Jul 18, 2024
Something like this:

```ts
  {
    name: 'select',
    type: 'select',
    dbName: ({ tableName }) => `${tableName}_customSelect`,
    enumName: 'selectEnum',
    hasMany: true,
    options: ['a', 'b', 'c'],
},
```
        
caused the "Functions cannot be passed directly to Client Components"
error, as the dbName function was sent to the client.

Now, you can run `pnpm dev database` again without it erroring
paulpopus pushed a commit that referenced this pull request Jul 24, 2024
Something like this:

```ts
  {
    name: 'select',
    type: 'select',
    dbName: ({ tableName }) => `${tableName}_customSelect`,
    enumName: 'selectEnum',
    hasMany: true,
    options: ['a', 'b', 'c'],
},
```
        
caused the "Functions cannot be passed directly to Client Components"
error, as the dbName function was sent to the client.

Now, you can run `pnpm dev database` again without it erroring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant