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

[FE][FIX] Add 'use client' to form provider #101

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/common/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { InputProps } from './Input.interface';
import { useFormContext } from 'react-hook-form';
import { generateClassNames } from '@app/utils';
import { ErrorMessage } from '@hookform/error-message';
import { CheckMarkIcon } from '@app/static/icons/AlertTriangleIcon';
import { AlertTriangleIcon } from '@app/static/icons/AlertTriangleIcon';

export const Input: FC<InputProps> = memo(({ label, name, placeholder, options = {}, ...otherProps }) => {
const { formState, register, getFieldState } = useFormContext();
Expand Down Expand Up @@ -31,7 +31,7 @@ export const Input: FC<InputProps> = memo(({ label, name, placeholder, options =
name={name}
render={({ message }) => (
<div className="flex items-center gap-x-2">
<CheckMarkIcon />
<AlertTriangleIcon />
<div className="text-sm text-red-600 first-letter:uppercase">{message}</div>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { FC, PropsWithChildren } from 'react';
import { useForm } from 'react-hook-form';

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/static/icons/AlertTriangleIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const CheckMarkIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
export const AlertTriangleIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
fillRule="evenodd"
Expand Down