mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-16 12:54:21 +01:00
fix: merge small conflicts
This commit is contained in:
@@ -14,7 +14,7 @@ interface Props {
|
||||
|
||||
export interface IListProjectForm {
|
||||
id?: number
|
||||
name: string
|
||||
title: string
|
||||
website: string
|
||||
tagline: string
|
||||
description: string
|
||||
@@ -43,7 +43,7 @@ export interface IListProjectForm {
|
||||
|
||||
const schema: yup.SchemaOf<IListProjectForm> = yup.object({
|
||||
id: yup.number().optional(),
|
||||
name: yup.string().trim().required().min(2),
|
||||
title: yup.string().trim().required().min(2),
|
||||
website: yup.string().trim().url().required(),
|
||||
tagline: yup.string().trim().required().min(10),
|
||||
description: yup.string().trim().required().min(50, 'Write at least 10 words descriping your project'),
|
||||
@@ -68,7 +68,7 @@ export default function FormContainer(props: PropsWithChildren<Props>) {
|
||||
const methods = useForm<IListProjectForm>({
|
||||
defaultValues: {
|
||||
id: !!params.get('id') ? Number(params.get('id')) : undefined,
|
||||
name: "",
|
||||
title: "",
|
||||
website: "",
|
||||
tagline: "",
|
||||
description: "",
|
||||
|
||||
@@ -42,11 +42,11 @@ export default function ProjectDetailsTab(props: Props) {
|
||||
type='text'
|
||||
className="input-text"
|
||||
placeholder='e.g BOLT🔩FUN'
|
||||
{...register("name")}
|
||||
{...register("title")}
|
||||
/>
|
||||
</div>
|
||||
{errors.name && <p className="input-error">
|
||||
{errors.name.message}
|
||||
{errors.title && <p className="input-error">
|
||||
{errors.title.message}
|
||||
</p>}
|
||||
<p className="text-body5 mt-16 font-medium">
|
||||
Project link<sup className="text-red-500">*</sup>
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function SaveChangesCard(props: Props) {
|
||||
const isUpdating = useMemo(() => !!getValues('id'), [getValues]);
|
||||
|
||||
|
||||
const [img, name, tagline] = watch(['thumbnail_image', 'name', 'tagline'])
|
||||
const [img, name, tagline] = watch(['thumbnail_image', 'title', 'tagline'])
|
||||
|
||||
const clickCancel = () => {
|
||||
if (window.confirm('You might lose some unsaved changes. Are you sure you want to continue?'))
|
||||
@@ -40,7 +40,7 @@ export default function SaveChangesCard(props: Props) {
|
||||
Modal: "ProjectListedModal", props: {
|
||||
project: {
|
||||
id: data.id!,
|
||||
name: data.name,
|
||||
name: data.title,
|
||||
img: data.thumbnail_image || "https://picsum.photos/id/870/150/150.jpg",
|
||||
tagline: data.tagline,
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export class NotificationsService {
|
||||
|
||||
static warn(msg: string, options?: AlertOptions) {
|
||||
toast.warn(msg, {
|
||||
onClose: options?.onComplete,
|
||||
onClose: options?.onClose,
|
||||
autoClose: options?.autoClose ?? 2500,
|
||||
...options,
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@ import "src/styles/index.scss";
|
||||
import 'react-loading-skeleton/dist/skeleton.css'
|
||||
import { ApolloProvider } from '@apollo/client';
|
||||
import { apolloClient } from '../apollo';
|
||||
import { Controller, FormProvider, useForm, UseFormProps, Controller } from 'react-hook-form';
|
||||
import { Controller, FormProvider, useForm, UseFormProps, } from 'react-hook-form';
|
||||
import ModalsContainer from 'src/Components/Modals/ModalsContainer/ModalsContainer';
|
||||
import { ToastContainer } from 'react-toastify';
|
||||
import { NotificationsService } from 'src/services';
|
||||
|
||||
Reference in New Issue
Block a user