@ant-design/icons#UsergroupAddOutlined JavaScript Examples

The following examples show how to use @ant-design/icons#UsergroupAddOutlined. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Teams.js    From ctf_platform with MIT License 5 votes vote down vote up
CreateTeamForm = (props) => {
    const [form] = Form.useForm()
    const [loading, setLoading] = React.useState(false)

    return (
        <Form
            form={form}
            name="createTeam"
            onFinish={async (values) => {
                setLoading(true)
                await fetch(window.ipAddress + "/v1/team/create", {
                    method: 'post',
                    headers: { 'Content-Type': 'application/json', "Authorization": window.IRSCTFToken },
                    body: JSON.stringify({
                        "name": values.name,
                    })
                }).then((results) => {
                    return results.json(); //return data in JSON (since its JSON data)
                }).then((data) => {
                    if (data.success === true) {
                        message.success({ content: "Created the team " + values.name + " successfully!" })
                        form.resetFields()
                        props.loadTeamDetails(values.name)
                        props.setTeam(values.name)
                        props.obtainScore()
                        props.setState({ createTeamModal: false })
                    }
                    else if (data.error === "name-taken") {
                        message.error("Team name has been taken. Please select another name.")
                    }
                    else if (data.error === "in-team") {
                        message.error("Already in a team. Please leave your team to create a new team")
                    }
                    else if (data.error === "same-name-as-user") {
                        message.error("The team name you have chosen is the same as a username. Please choose another name instead.")
                    }
                    else if (data.error === "team-full") {
                        message.error("This team is full and is unable to take anymore members.")
                    }
                    else {
                        message.error({ content: "Oops. Unknown error." })
                    }

                }).catch((error) => {
                    console.log(error)
                    message.error({ content: "Oops. There was an issue connecting with the server" });
                })
                setLoading(false)
            }}
            style={{ display: "flex", flexDirection: "column", justifyContent: "center", width: "100%" }}
        >
            <h3>Team Name:</h3>
            <Form.Item
                name="name"
                rules={[
                    {
                        required: true,
                        message: 'Please input a valid team name that is alphanumeric with spaces or underscores',
                        pattern: /^[a-zA-Z0-9_ ]+$/
                    },
                ]}
            >

                <Input icon={<IdcardOutlined />}  allowClear placeholder="Enter a team name" />
            </Form.Item>

            <Form.Item>
                <Button style={{ marginRight: "1.5vw" }} onClick={() => { props.setState({ createTeamModal: false }) }}>Cancel</Button>
                <Button type="primary" htmlType="submit" icon={<UsergroupAddOutlined />} loading={loading}>Create Team</Button>
            </Form.Item>
        </Form>
    );
}
Example #2
Source File: Teams.js    From ctf_platform with MIT License 4 votes vote down vote up
render() {
        return (
            <Layout className="layout-style">

                <Modal
                    title={<span>Create New Team <UsergroupAddOutlined /></span>}
                    visible={this.state.createTeamModal}
                    footer={null}
                    onCancel={() => { this.setState({ createTeamModal: false }) }}
                >
                    <CreateTeamForm setState={this.setState.bind(this)} obtainScore={this.props.obtainScore.bind(this)} loadTeamDetails={this.loadTeamDetails.bind(this)} setTeam={this.props.setTeam.bind(this)} />
                </Modal>

                {this.state.loading ? (
                    <div style={{ position: "absolute", left: "55%", transform: "translate(-55%, 0%)", zIndex: 10 }}>
                        <Ellipsis color="#177ddc" size={120} ></Ellipsis>
                    </div>
                ) : (
                    <div>
                        {this.props.team === "teams-disabled" ? (
                            <div style={{ display: "flex", placeContent: "center center", textAlign: "center", fontSize: "130%", width: "100%", height: "100%" }}>
                                <div>
                                    <TeamOutlined style={{ fontSize: "600%", color: "#177ddc" }} />
                                    <div>
                                        <h1>It seem's like teams are disabled.</h1>
                                        <p>If you believe this is an error, please contact the admins.</p>
                                    </div>
                                </div>
                            </div>
                        ) : (
                            <div>
                                {this.state.notFound ? (
                                    <div style={{ display: "flex", placeContent: "center center", textAlign: "center", fontSize: "130%", width: "100%", height: "100%" }}>
                                        <div>
                                            <TeamOutlined style={{ fontSize: "600%", color: "#177ddc" }} />
                                            <div>
                                                <h1>We were unable to find this team.</h1>
                                            </div>
                                        </div>
                                    </div>
                                ) : (
                                    <div>
                                        {this.state.teamName ?
                                            (
                                                <Layout style={{ height: "100%", width: "100%", padding: "3%", backgroundColor: "rgba(0, 0, 0, 0)" }}>
                                                    <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "2ch" }}>
                                                        <div style={{ display: "flex" }}>
                                                            <div style={{ display: "flex", marginRight: "5ch", alignItems: "center", justifyItems: "center" }}>
                                                                <Avatar.Group
                                                                    maxCount={3}
                                                                >
                                                                    {this.state.members.map((member) => {
                                                                        return (
                                                                            <Avatar style={{ backgroundColor: "transparent", marginRight: "3ch", width: "10ch", height: "10ch" }} size='large' src={"/static/profile/" + member + ".webp"} />
                                                                        )
                                                                    })}

                                                                </ Avatar.Group>
                                                                <h1 style={{ fontSize: "5ch" }}>{this.state.teamName}</h1>
                                                            </div>
                                                            <div>
                                                                <h1 style={{ fontSize: "5ch", color: "#faad14" }}><span style={{ color: "#d48806", fontSize: "1.5ch" }}><u>Team Score:</u> </span>{this.state.teamScore}</h1>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    {this.state.teamName === this.props.team && (
                                                        <div style={{ backgroundColor: "rgba(0, 0, 0, 0.3)", border: "5px solid transparent", borderRadius: "20px", width: "fit-content", padding: "20px" }}>
                                                            <h4 style={{ fontSize: "2ch", color: "#49aa19" }}>You are part of this team</h4>
                                                            <div style={{ marginTop: "2ch" }}>
                                                                <div style={{ display: "flex", marginBottom: "2ch" }}>
                                                                    <Input value={window.location.origin + "/Team/Join/" + this.state.code} />
                                                                    <Button type="primary" style={{ marginLeft: "1ch" }} icon={<LinkOutlined />} onClick={async () => {
                                                                        await navigator.clipboard.writeText(window.location.origin + "/Team/Join/" + this.state.code);
                                                                        message.success("Invite link copied to clipboard.")

                                                                    }}>Copy Invite Link</Button>
                                                                </div>
                                                                <Button style={{ marginRight: "1ch" }} danger type="primary" onClick={() => {
                                                                    confirm({
                                                                        title: "Leave Team?",
                                                                        content: <span>Are you sure you want to leave: <b><u>{this.state.teamName}</u></b>?</span>,
                                                                        icon: <WarningOutlined />,
                                                                        maskClosable: true,
                                                                        okText: "Leave Team",
                                                                        confirmLoading: this.state.joinLoading,
                                                                        onOk: (close) => { this.leaveTeam(close) },
                                                                        onCancel: () => { },
                                                                    });
                                                                }}>Leave Team</Button>
                                                            </div>
                                                        </div>
                                                    )}

                                                    <Divider />
                                                    <h1 style={{ fontSize: "3ch" }}>Individual Member's Scoring</h1>
                                                    <Table style={{ marginTop: "2vh" }} dataSource={this.state.userScores} pagination={{ pageSize: 10 }} locale={{
                                                        emptyText: (
                                                            <div style={{ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", marginTop: "10vh" }}>
                                                                <FileUnknownTwoTone style={{ color: "#177ddc", fontSize: "400%", zIndex: 1 }} />
                                                                <h1 style={{ fontSize: "200%" }}>{this.state.teamName} has not completed any challenges/bought any hints</h1>
                                                            </div>
                                                        )
                                                    }}>
                                                        <Column width={30} title="Username" dataIndex="username" key="username"
                                                            render={(text, row, index) => {
                                                                return <Link to={"/Profile/" + text}><a style={{ fontWeight: 700 }}>{text}</a></Link>;
                                                            }}
                                                        />
                                                        <Column width={30} title="Total Score" dataIndex="score" key="score" />
                                                    </Table>
                                                    <Divider />
                                                    <h1 style={{ fontSize: "3ch" }}>Team Score History</h1>
                                                    <div style={{ height: 375, width: "100%", backgroundColor: "rgba(0, 0, 0, 0.3)", border: "5px solid transparent", borderRadius: "20px", padding: "10px", margin: "10px" }}>
                                                        <ResponsiveContainer width="90%" height={350}>
                                                            <AreaChart height={350} data={this.state.graphData}
                                                                margin={{ top: 10, right: 15, left: 15, bottom: 15 }}>

                                                                <defs>
                                                                    <linearGradient id="color1" x1="0" y1="0" x2="0" y2="1">
                                                                        <stop offset="5%" stopColor="#791a1f" stopOpacity={0.3} />
                                                                        <stop offset="95%" stopColor="#f89f9a" stopOpacity={0.1} />
                                                                    </linearGradient>
                                                                </defs>
                                                                <XAxis dataKey="Time">
                                                                    <Label offset={-5} position="insideBottom" style={{ fill: 'rgba(207, 207, 207, 1)' }}>
                                                                        Time
                                                                    </Label>
                                                                </XAxis>
                                                                <YAxis >
                                                                    <Label offset={-10} position='insideLeft' style={{ fill: 'rgba(207, 207, 207, 1)' }}>
                                                                        Score
                                                                    </Label>
                                                                </YAxis>
                                                                <CartesianGrid strokeDasharray="3 3" />

                                                                <Tooltip labelStyle={{ backgroundColor: "#1c2b3e" }} contentStyle={{ backgroundColor: "#1c2b3e" }} wrapperStyle={{ backgroundColor: "#1c2b3e" }} />
                                                                <Area isAnimationActive={false} type="monotone" dataKey="Score" stroke="#d32029" fillOpacity={1} fill="url(#color1)" />
                                                            </AreaChart>
                                                        </ResponsiveContainer>

                                                    </div>
                                                    <Table style={{ marginTop: "2vh" }} dataSource={this.state.scores} pagination={{ pageSize: 10 }} locale={{
                                                        emptyText: (
                                                            <div style={{ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", marginTop: "10vh" }}>
                                                                <FileUnknownTwoTone style={{ color: "#177ddc", fontSize: "400%", zIndex: 1 }} />
                                                                <h1 style={{ fontSize: "200%" }}>{this.state.teamName} has not completed any challenges/bought any hints</h1>
                                                            </div>
                                                        )
                                                    }}>
                                                        <Column width={30} title="Username" dataIndex="username" key="username"
                                                            render={(text, row, index) => {
                                                                return <Link to={"/Profile/" + text}><a style={{ fontWeight: 700 }}>{text}</a></Link>;
                                                            }}
                                                        />
                                                        <Column width={1} title="Challenge/Hint" dataIndex="challenge" key="challenge"
                                                            render={(text, row, index) => {
                                                                if (row.challengeID !== "") return <Link to={"/Challenges/" + row.challengeID}><a style={{ fontWeight: 700 }}>{text}</a></Link>;
                                                                else return (<span>{text}</span>);
                                                            }} />
                                                        <Column width={30} title="Score Change" dataIndex="score" key="score" />
                                                        <Column width={30} title="Solved Timestamp" dataIndex="time" key="time" />
                                                    </Table>
                                                </Layout>

                                            ) :
                                            (
                                                <div style={{ display: "flex", placeContent: "center center", textAlign: "center", fontSize: "130%", width: "100%", height: "100%" }}>
                                                    <div>
                                                        <TeamOutlined style={{ fontSize: "600%", color: "#177ddc" }} />
                                                        <div>
                                                            <h1>The world's a dangerous place</h1> <h2>Don't go alone, join/create a team today!</h2>
                                                        </div>
                                                        <Button icon={<UsergroupAddOutlined />} type="primary" size="large" onClick={() => { this.setState({ createTeamModal: true }) }}>Create a Team</Button>
                                                        <div style={{ marginTop: "3ch" }}>
                                                            <span>Got an <b>invite link <LinkOutlined />?</b></span>
                                                            <div>
                                                                <Button style={{ marginTop: "1ch" }} size="large" type="primary" icon={<LinkOutlined />} onClick={() => {
                                                                    navigator.clipboard.readText().then(text => {
                                                                        if (!(/^.*\/Team\/Join\/[0-9a-fA-F]{32}$/.test(text))) message.error("Invalid link. Please check that you have copied the link correctly.", 3)
                                                                        else {
                                                                            const code = text.split("/Team/Join/")
                                                                            this.getCodeDetails(code[1])
                                                                        }

                                                                    }).catch(err => {
                                                                        console.log(err)
                                                                        message.error("Failed to read link from your clipboard.", 5)
                                                                        message.info("Please ensure that you have allowed permissions for reading of clipboard text.", 5)
                                                                    })

                                                                }}>Paste &amp; Use Link</Button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            )
                                        }
                                    </div>
                                )}
                            </div>

                        )}

                    </div>
                )}

            </Layout>
        )
    }
Example #3
Source File: index.js    From certificate-generator with MIT License 4 votes vote down vote up
function ListEvents(props) {

const { Meta } = Card;
	/*Recebe o organizador e o JSON de organizadores*/
	const { organizador, users } = props

	/*Trabalham para trocar a tela da lista de eventos com o formulário de edição/criação*/
	const [ toEditFormEvent, setToEditFormEvent] = useState(false);
	const [ toCreateFormEvent, setToCreateFormEvent] = useState(false);
	const [ toProfile, setProfile] = useState(false);
	const [ toList, setList] = useState(false);
	const [ toSeeEvents, setSeeEvents] = useState(false);

	/*Esta variavel guarda o evento referente quando o botão check participantes for acionado*/
	const [ eventChecked, setEventChecked] = useState('');

	/*JSON dos eventos*/
	const [ eventos, setEventos ] = useState(eventosData)

	/*Vaiável para saber qual evento foi editado*/
	const [ eventEdited, setEventEdited ] = useState('')
	  
	//Dados do evento:
	//Serão usados para editar no formulário
	const [ company, setCompany] = useState('');
	const [ course, setCourse ] = useState('');
	const [ startDate, setStartDate ] = useState('');
	const [ finishDate, setFinishDate ] = useState('');
	const [ workload, setWorkload ] = useState('');

	/*---------- Assinatura Digital ----------*/
	const [ imageURL, setImageURL ] = useState(null)

	const sigCanvas = useRef({})

	const clear = () => sigCanvas.current.clear();

	const save = () => {
		setImageURL(sigCanvas.current.getTrimmedCanvas().toDataURL("image/png"))
	}

	/*--------- Formulário para criar evento ---------*/
	const { RangePicker } = DatePicker;

	/*Constroi o layout do input de datas*/
	const formItemLayout = {
	  labelCol: {
	    xs: {
	      span: 24,
	    },
	    sm: {
	      span: 8,
	    },
	  },
	  wrapperCol: {
	    xs: {
	      span: 24,
	    },
	    sm: {
	      span: 16,
	    },
	  },
	};

	/*Constroi o layout do input de name/curso*/
	const formInputLayout = {
	  labelCol: {
	    span: 4,
	  },
	  wrapperCol: {
	    span: 8,
	  },
	};

	/*Define as regras para que a data seja aceita */
	const rangeConfig = {
	  rules: [
	    {
	      type: 'array',
	      required: true,
	      message: 'Este campo é obrigatório!',
	    },
	  ],
	};

	/*Define as regras para que os inputs de texto sejam aceitos */
	const rangeInputs = {
		rules: [
	    	{
	        	required: true,
	            message: 'Por favor, preencha esse campo',
	        },
		],
	};

	/*Função acionada quando um evento for ser criado*/
	/*Ela não é chamada caso os campos não forem preeenchidos*/
	const onFinish = fieldsValue => {

	    /*Dados do calendário*/
	    const rangeValue = fieldsValue['range-picker'];

	    if(imageURL === null) {
	    	message.error('Por favor, escreva sua assinatura digital')
	    } else {
	    	setEventos([
				...eventos, {
				user: organizador,
				company: fieldsValue.company, 
				course: fieldsValue.course,
				startDate: rangeValue[0].format('DD-MM-YYYY'), 
				finishDate: rangeValue[1].format('DD-MM-YYYY'), 
				workload: fieldsValue.workload, 
				logo: "https://miro.medium.com/max/478/1*jriufqYKgJTW4DKrBizU5w.png", 
				digitalSignature: imageURL
			}
		])

		message.success('Evento criado com sucesso')

		/*Retira o componente do formulário de eventos e volta para a lista*/
	    setToCreateFormEvent(false)
	    }  
	};

	/*Buscando os eventos do organizador*/

	let eventsOfOrganizer = []

	eventos.map(evento => {
		if(evento.user === organizador) {
			eventsOfOrganizer.push(evento)
		}
	})

	/*Verifica se existem eventos cadastrados para mostrar elemento do Antd 'No Data'*/
	let noEvents = true

	/* ------------- Deletando Eventos ---------------*/
	const deleteEvent = (eventToBeDeleted) => {

		message.success('O evento foi excluido')

		setEventos( eventsOfOrganizer.filter(evento => {
			if(evento.course !== eventToBeDeleted) {
				return evento
			}
		}))
	}

	/* -------------- Editando eventos ----------------*/
	const beforeEdit = () => {

		if( !company || !course || !startDate || !finishDate || ! workload || !imageURL){
			message.error('Por favor, não deixe seus dados vazios.')
			//quando o formulário aparece na tela, essa mensagem aparece, caso o campo não tenha sido preenchido.
		} else {
			setToEditFormEvent(!toEditFormEvent)
		}
	}

	//Ao salvar as informações editadas:
	const saveEditFormEvent = (e) => {
		e.preventDefault();
		//Os campos que devem ser preenchidos:
		if( !company || !course || !startDate || !finishDate || ! workload || !imageURL){
			message.error('Por favor, preencha todos os campos do formulário.')
			//quando o formulário aparece na tela, essa mensagem aparece, caso o campo não tenha sido preenchido.

		} else {
			/*Atualizando o evento do organizador*/
			setEventos(eventsOfOrganizer.map(evento => {
				
				/*Mudando somente o evento requerido*/
				if(eventEdited === evento.course) {
					evento['company'] = company
					evento['course'] = course
					evento['startDate'] = startDate
					evento['finishDate'] = finishDate
					evento['workload'] = workload
					evento['digitalSignature'] = imageURL

					return evento;
				} else {
					return evento;
				}
				
			}) )

			message.success('Os dados do evento foram atualizados com sucesso!')

			/*Voltando para a lista de eventos*/
			//setToEditFormEvent(!toEditFormEvent)
		}
		
	}

	const clickEditFormEvent = (eventToBeEdit) => {

		/*Trocando a lista de eventos pelo formulário de edição*/
		setToEditFormEvent(!toEditFormEvent)

		/*Guardando qual evento será editado*/
		setEventEdited(eventToBeEdit.course)

		setCompany(eventToBeEdit.company)
		setCourse(eventToBeEdit.course)
		setStartDate(eventToBeEdit.startDate)
		setFinishDate(eventToBeEdit.finishDate)
		setWorkload(eventToBeEdit.workload)
	}

	/*Esta função é acionada quando o botão para o check list é acionado*/
	const saveEventToList = (eventToList) => {
		setList(true)
		setEventChecked(eventToList)
	}

	/*Esta função é acionada quando o botão para mais infomações do evento*/
	const seeEvents = (eventToList) => {
		setSeeEvents(true)
		setEventChecked(eventToList)
	}

	return(
		<>
		
		<div style={{ display: ( toEditFormEvent || toCreateFormEvent || toProfile || toList || toSeeEvents )?  'none' : null }}>

			<h1 className="title-2-list-events"><UserOutlined onClick={() => setProfile(true)}/> {organizador}</h1>

			<Button className="button-add" onClick={() => setToCreateFormEvent(true)}><UsergroupAddOutlined/> Cadastrar mais um evento</Button>
			
			<br/>
			<h1 className="title">Eventos Cadastrados</h1>
			<div className="listEvents">
			{
				eventos.map(eventoJson => {

					if(eventoJson.user === organizador ){
						noEvents = false
						return(
							<Card 
								style={{ width: 300 }}
								    cover={
								     	<img
								   			alt="Poster do evento"
								    		src="https://jaquelinecramos.files.wordpress.com/2018/03/dyfqkqaw0aad5xm.jpg?w=776"
								      />
								    }
								    actions={[
								    	<>
								    	<Popover content={<h5>Ver mais info. do evento</h5>}>
								     		<Button style={{ borderColor: 'transparent'}} onClick={() => seeEvents(eventoJson) }><HeartOutlined key="edit" /></Button>
								     	</Popover>

								     	<Popover content={<h5>Editar evento</h5>}>
								     		<Button style={{ borderColor: 'transparent'}} onClick={() =>  clickEditFormEvent(eventoJson) } ><FormOutlined key="edit" /></Button>
								     	</Popover>

								     	<Popover content={<h5>Participantes</h5>}>
								     		<Button style={{ borderColor: 'transparent'}} onClick={() =>  saveEventToList(eventoJson)}><TeamOutlined key="ellipsis" /></Button>
								    	</Popover>

								     	<Popconfirm 
								     		title="Você tem certeza de que quer excluir este evento?"
								     		onConfirm={() => deleteEvent(eventoJson.course) }
								     		okText="Sim"
								     		cancelText="Não"
								     	>
								    		<Button style={{ borderColor: 'transparent'}} ><CloseOutlined key="edit" /></Button>
								    	</Popconfirm>
								    	</>
								    ]}
								  >
								    <Meta
								      avatar={<Avatar src="https://cdn-images-1.medium.com/max/1200/1*B8rGvo7fJ7qL4uFJ_II_-w.png" />}
								      title={<h4 style={{ color: '#C6255A'}}>{eventoJson.course}</h4>}
								      description={
								      		<>
								      			<h5 style={{ fontSize: '12px'}}>Inicio: &nbsp;{eventoJson.startDate}</h5>
								      			
								      			<h5 style={{ fontSize: '12px'}}>Encerramento: &nbsp;{eventoJson.finishDate}</h5>
								      		</>
								      	}
								    />
							</Card>
						)
					}
				})
			}
			{ noEvents && <Empty style={{marginTop: '5%'}}/> }
			</div>

		</div>
		{toEditFormEvent && 
		// Mostra na tela o formulário com os campos para serem editados
		//o value está trazendo as informações do último cadastrado "Lucas...."
		//quando eu troco o nome do course (Evento), altera o nome dos 3 eventos que estão sendo mostrados na tela
			<div className="edit-event"
				style={{ display: toEditFormEvent ?  'block' : 'none' }} >

				<h2 className="edit-event-title">Edite os dados do seu evento:</h2>
				<h4>Comunidade:</h4>
				<Input 
					className="edit-event-input" 
					placeholder="Comunidade" 
					value={company} 
					onChange={ newValue => setCompany(newValue.target.value) } />
				<br/>
				<h4>Evento:</h4>
				<Input 
					className="edit-event-input" 
					placeholder="Evento" 
					value={course} 
					onChange={ newValue => setCourse(newValue.target.value) }/>
				<br/>
				<h4>Data de Inicio:</h4>
				<Input 
					className="edit-event-input" 
					placeholder="Data de Início" 
					value={startDate} 
					onChange={ newValue => setStartDate(newValue.target.value) }/>
				<br/>
				<h4>Data de Encerramento:</h4>
				<Input 
					className="edit-event-input" 
					placeholder="Data de Fim" 
					value={finishDate} 
					onChange={ newValue => setFinishDate(newValue.target.value) }/>
				<br/>
				<h4>Carga Horaria:</h4>
				<Input 
					className="edit-event-input" 
					placeholder="Carga Horária" 
					value={workload} 
					onChange={ newValue => setWorkload(newValue.target.value) }/>
				<br/>
				<h4>Assinatura Digital:</h4>
				<div>
					<Popup modal trigger={<Button className="button-open-pad">Abrir Pad para assinar</Button>}>
						{ close => (
							<>
								<SignaturePad ref={sigCanvas}
											  canvasProps={{
											  	className: 'signatureCanvas'
											  }}
								/>
								<Button onClick={save} className="button-save">Salvar</Button>
								<Button onClick={clear} >Apagar Tudo</Button>
								<Button onClick={close} className="button-close" >Fechar</Button>
							</>
						)}
					</Popup>
					<br/>
					<br/>
					{ imageURL ? (
						<img
							src={imageURL}
							alt="Minha assinatura Digital"
							className="buttons-pad"

						/>
					) : null }
				</div>

				<Button 
					className="button-edit-event" type="primary" primary 
					onClick={saveEditFormEvent}>Atualizar dados</Button>
				<br/>

				<Button className="back-edit-event" onClick={beforeEdit}>Voltar para a lista de eventos</Button>
			</div>
		}

		{ toCreateFormEvent && 
			<>
				
				<Form name="time_related_controls" {...formItemLayout} onFinish={onFinish}>  
			      <div className="inputs-event">
			        <h1 className="h1-form-event">Criando um novo evento</h1>
			        <Form.Item
				        {...formInputLayout}
				        {...rangeInputs}
			          className="input-1-event"
				        name="company"
				        label="Comunidade" >

			          <Input placeholder="Digite a comunidade responsável pelo evento" />
			        </Form.Item>

			        <Form.Item
			          {...formInputLayout}
			          {...rangeInputs}
			          className="input-2-event"
			          name="course"
			          label="Curso/Evento">
			          <Input placeholder="Digite o nome do evento"  />
			        </Form.Item>

			        <Form.Item 
			          {...rangeInputs}
			          className="input-3-event"
			          label="Carga Horária" 
			          name="workload" >
			          <InputNumber /> 
			        </Form.Item>

			        <Form.Item 
			          name="range-picker" 
			          className="input-4-event"
			          label="Data de inicio/fim do evento" 
			          {...rangeConfig}>
			          <RangePicker />
			        </Form.Item>

			        <div className="upload-assinature">
			        	<h3 className="h3-form-event">Assinatura Digital:</h3>
			        	<div>
							<Popup modal trigger={<Button className="button-open-pad">Abrir Pad para assinar</Button>}>
								{ close => (
									<>
										<SignaturePad ref={sigCanvas}
													  canvasProps={{
													  	className: 'signatureCanvas'
													  }}
										/>
										<Button onClick={save} className="button-save">Salvar</Button>
										<Button onClick={clear} >Apagar Tudo</Button>
										<Button onClick={close} className="button-close" >Fechar</Button>
									</>
								)}
							</Popup>
							<br/>
							<br/>
							{ imageURL ? (
								<img
									src={imageURL}
									alt="Minha assinatura Digital"
									className="buttons-pad"
								/>
							) : <h4 style={{ color: 'red'}}>Sem assinatura</h4> }
						</div>
			        </div>


			        <Form.Item>
			        	<Button type="primary" htmlType="submit" className="button-events">
			        		Cadastrar Novo Evento
			        	</Button>
			            <br/>
			        </Form.Item>

			         
			      </div>
			    </Form>
				<Button 
					onClick={() => setToCreateFormEvent(false)} 
					className="button-back-from-create"
					>
	                Voltar para a lista de Eventos
	            </Button>
			</>
		}

		{ toProfile && 
			<>
				<ProfileCard organizador={organizador} users={users} assinatura={imageURL}/>
				<Button 
					onClick={() => setProfile(false)}
					className="button-back-of-profile" 
					>
	                Voltar para a lista de Eventos
	            </Button>
			</>
		}

		{ toList &&
			<>
				<ListOfPresents evento={eventChecked}/>
				<Button onClick={() => setList(false)} className="button-back-from-list" style={{ marginButtom: '-20%'}}>
	                Voltar para a lista de Eventos
	            </Button>
	        </>
		}

		{
			toSeeEvents && 
				<>
					<InfoEvent evento={eventChecked}/>
					<Button 
						onClick={() => setSeeEvents(false)}
						className="button-back-of-profile" 
						>
	                	Voltar para a lista de Eventos
	            	</Button>
	            </>
		}
		</>		
			
	);
}