Skip to content

Commit 12d3290

Browse files
fix(ui/cli/setup-init): nextjs warning (#1600)
* fix(ui/cli/setup-init): nextjs warning * changeset
1 parent d1ee1eb commit 12d3290

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.changeset/hungry-oranges-boil.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"flowbite-react": patch
3+
---
4+
5+
fix(ui/cli/setup-init): nextjs warning
6+
7+
### Changes
8+
9+
- [x] rename `config` -> `CONFIG` export in `.flowbite-react/init.(jsx|tsx)`

apps/storybook/.flowbite-react/init.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
import { StoreInit } from "flowbite-react/store/init";
1010
import React from "react";
1111

12-
export const config = {
12+
export const CONFIG = {
1313
dark: true,
1414
prefix: "",
1515
version: 3,
1616
};
1717

1818
export function ThemeInit() {
19-
return <StoreInit {...config} />;
19+
return <StoreInit {...CONFIG} />;
2020
}
2121

2222
ThemeInit.displayName = "ThemeInit";

apps/web/.flowbite-react/init.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
import { StoreInit } from "flowbite-react/store/init";
1010
import React from "react";
1111

12-
export const config = {
12+
export const CONFIG = {
1313
dark: true,
1414
prefix: "",
1515
version: 3,
1616
};
1717

1818
export function ThemeInit() {
19-
return <StoreInit {...config} />;
19+
return <StoreInit {...CONFIG} />;
2020
}
2121

2222
ThemeInit.displayName = "ThemeInit";

packages/ui/src/cli/commands/setup-init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export async function setupInit(config: Config) {
2424
import { StoreInit } from "flowbite-react/store/init";
2525
import React from "react";
2626
27-
export const config = {
27+
export const CONFIG = {
2828
dark: ${config.dark},
2929
prefix: "${config.prefix}",
3030
version: ${config.version},
3131
};
3232
3333
export function ThemeInit() {
34-
return <StoreInit {...config} />;
34+
return <StoreInit {...CONFIG} />;
3535
}
3636
3737
ThemeInit.displayName = "ThemeInit";

0 commit comments

Comments
 (0)