in public/src/components/channelManagement/bannerDeploy/bannerChannelDeployer.tsx [18:74]
marginTop: spacing(2),
},
},
}));
export interface BannerDeployRegion {
timestamp: number;
email: string;
}
export interface BannerDeploys {
Australia: BannerDeployRegion;
EuropeanUnion: BannerDeployRegion;
RestOfWorld: BannerDeployRegion;
UnitedStates: BannerDeployRegion;
UnitedKingdom: BannerDeployRegion;
}
export interface BannersToRedeploy {
Australia: boolean;
EuropeanUnion: boolean;
RestOfWorld: boolean;
UnitedStates: boolean;
UnitedKingdom: boolean;
}
interface DataFromServer {
value: BannerDeploys;
version: string;
email: string;
}
interface BannerChannelDeployerProps {
channel: BannerChannel;
}
const BannerChannelDeployer: React.FC<BannerChannelDeployerProps> = ({
channel,
}: BannerChannelDeployerProps) => {
const classes = useStyles();
const isChannel1 = channel === 'CHANNEL1';
const settingsType = isChannel1
? FrontendSettingsType.bannerDeploy
: FrontendSettingsType.bannerDeploy2;
const [dataFromServer, setDataFromServer] = useState<DataFromServer | null>(null);
const [bannersToRedeploy, setBannersToRedeploy] = useState<BannersToRedeploy>({
Australia: false,
EuropeanUnion: false,
RestOfWorld: false,
UnitedStates: false,
UnitedKingdom: false,
});
const onRedeployAllClick = (shouldRedeploy: boolean): void => {
setBannersToRedeploy({