Skip to content

Commit 72bf287

Browse files
committed
fix: add 'use client' directives for Next.js SSR compatibility
1 parent 9cb2bc6 commit 72bf287

32 files changed

Lines changed: 87 additions & 6 deletions

File tree

src/components/BoemlyAccordion/BoemlyAccordion.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React from 'react';
24
import { Accordion, Box, Heading } from '@chakra-ui/react';
35
import { RichText } from '../RichText';
@@ -18,7 +20,7 @@ export const BoemlyAccordion: React.FC<BoemlyAccordionProps> = ({
1820
defaultIndex,
1921
}: BoemlyAccordionProps) => {
2022
const textColor = variant === 'black' ? 'gray.500' : 'white';
21-
const initialExpandedValues = defaultIndex.map((index) => rows[index].id.toString());
23+
const initialExpandedValues = defaultIndex?.map((index) => rows[index].id.toString());
2224

2325
return (
2426
<Accordion.Root defaultValue={initialExpandedValues} collapsible visual={variant}>

src/components/BoemlyAlert/BoemlyAlert.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React, { ReactNode } from 'react';
24
import { Alert, CloseButton, Spinner, useToken } from '@chakra-ui/react';
35
import {

src/components/BoemlyFormControl/BoemlyFormControl.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React, { ReactNode } from 'react';
24
import {
35
Checkbox,

src/components/BoemlyModal/BoemlyModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { Button, CloseButton, Dialog, Portal } from '@chakra-ui/react';
24
import React, { ReactNode } from 'react';
35

src/components/BoemlySteps/BoemlySteps.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React from 'react';
24
import { Flex, Text, useToken, Stack } from '@chakra-ui/react';
35
import type { ConditionalValue } from '@chakra-ui/react';

src/components/BoemlyTabs/BoemlyTabs.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React, { useMemo, useState } from 'react';
24
import { Box, Flex } from '@chakra-ui/react';
35
import LineTabButton from './LineTabButton';

src/components/BoemlyTag/BoemlyTag.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React, { useState } from 'react';
24
import { Tag, TagRootProps } from '@chakra-ui/react';
35

src/components/BoemlyThemeProvider/BoemlyThemeProvider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React, { ReactNode } from 'react';
24
import { SystemContext } from '@chakra-ui/react';
35
import { IconContext } from '@phosphor-icons/react';

src/components/ConfirmAction/ConfirmAction.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import React, { ReactNode } from 'react';
24
import { BoemlyModal } from '../BoemlyModal';
35
import { Button, Flex, Text } from '@chakra-ui/react';

src/components/DatePicker/DatePicker.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import {
24
CloseButton,
35
Flex,

0 commit comments

Comments
 (0)