TS2322: Type '{ productTitle: string; campaignId: string; title: string; targetAudience: string; campaignType: string; campaignGoal: string; startDate: string; stillActive: boolean; svgSrc: number; } | Campaign' is not assignable to type '{ productTitle: string; campaignId: string; title: string; targetAudience: string; campaignType: string; campaignGoal: string; startDate: string; stillActive: boolean; svgSrc: number; }'. Type 'Campaign' is not assignable to type '{ productTitle: string; campaignId: string; title: string; targetAudience: string; campaignType: string; campaignGoal: string; startDate: string; stillActive: boolean; svgSrc: number; }'. Types of property 'productTitle' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'.
For this:
**setCampaigns([...campaigns, newCampaign]);**
Type 'Campaign' is not assignable to type '{ productTitle: string; campaignId: string; title: string; targetAudience: string; campaignType: string; campaignGoal: string; startDate: string; stillActive: boolean; svgSrc: number; }'.
Types of property 'productTitle' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'. For this: **setCampaigns([...campaigns, newCampaign]);**