Use current user's agency in Create Campaign modal
Replace hardcoded "OLIVER Agency" with the logged-in user's agency name from UserContext. The field remains disabled/non-editable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
407f11c003
commit
3508154693
1 changed files with 3 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { XIcon } from './icons/XIcon';
|
||||
import apiService from '../services/apiService';
|
||||
import { useUser } from '../contexts/UserContext';
|
||||
|
||||
interface CreateCampaignModalProps {
|
||||
isOpen: boolean;
|
||||
|
|
@ -17,6 +18,7 @@ interface CreateCampaignModalProps {
|
|||
}
|
||||
|
||||
export const CreateCampaignModal: React.FC<CreateCampaignModalProps> = ({ isOpen, onClose, onAddCampaign, brandGuidelines: brandGuidelineOptions = [] }) => {
|
||||
const { user } = useUser();
|
||||
const [name, setName] = useState('');
|
||||
const [selectedBrandGuideline, setSelectedBrandGuideline] = useState('');
|
||||
const [workfrontId, setWorkfrontId] = useState('');
|
||||
|
|
@ -153,7 +155,7 @@ export const CreateCampaignModal: React.FC<CreateCampaignModalProps> = ({ isOpen
|
|||
<label className="block text-sm font-medium text-black-title">Agency</label>
|
||||
<input
|
||||
type="text"
|
||||
value="OLIVER Agency"
|
||||
value={user?.agencyName ?? ''}
|
||||
className="mt-1 block w-full p-2 border-2 border-grey-300 rounded-[10px] shadow-sm bg-grey-100 text-grey-900 cursor-not-allowed"
|
||||
disabled
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue