Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
4.4 kB
2
Indexable
Never
importReact, { Component }from"react”;{newTitle: “”,newDescription:““,AddedAgenda: [title: "Angular",description:”Some descriptionabouttheangular“,topics: [“Introduction”, "Typescript",”WhyAngular?","UnderstandingVersions", “Fundamentals”]title: "Vue”,description:”Some descriptionaboutthevue“,topics: [“Introduction”, "Javascript",”WhyVue?","VueBindings”,“ComponentInteraction“]topicsArr: [],showAgendaBlock:falseconstvalue = e.target.value;constname = e.target.name;this.setState({ [name]: value })topicFun = ()=>{this.state.topicsArr.push(this.state.newTopic)this.setState({ newTopic:”“});agendaFun = ()=>{varagenda ={classAppextends




01:51

03:48
 Join our channel if you haven’t joined yethttps://t.me/fresco_miIestone( title: this.state.newTitle,description: this.state.newDescription,topics: this.state.topicsArrthis.setState({ newTitle:"“})this.setState({ newDescription:"“})this.setState({ newTopics:”“
 }) this.setState({ topicsArr:[] })this.state.AddedAgenda.push(agenda)formChec = (e)=>{e.preventDefault()checkAgendaFun = ()=>{this.state.showAgendaBlockfalse? this.setState({showAgendaBlock:true}) : this.setState({ showAgendaBlock:false})render() {return(<div><h1className="mx-5 mb-5">Agenda Manager</h1>{!this.state.showAgendaBlock &&<divclassName=”container” role="addAgenda"><buttonclassName=”btnbtn-info”onClick={this.checkAgendaFun} role=”goToView">Click To View Agenda</button><formonsubmit={this.formCheck}><divclassName=”my-3”><labelclassName="form-label">Title</label><inputtype=”text“ name=”newTitle“placeholder=”Enterthe title”className="form-control" role=“inputTitle"value={this.state.newTitle} onChange={this.changeFun}/><smallclassName="text-danger”data-testid=“invalidTitle“>”Title is required”:"“}{this.state.newTitle.trim().length ===0?</small></div><divclassName=”my-3“><labelclassName="form-label">Description</1abel>

 Join our channel if you haven’t joined yethttps://t.me/fresco_miIestone( ‹inputtype=”text" name=”newDescription"placeholder=”Enterthe description"className=”form-control"role=“inputDescription“ value={this.state.newDescription}onChange={this.changeFun}/>testid=“invalidDescription“›‹smallc1assName="text-danger”data-{this.state.newDescription.trim().length0?
 "Description is required":"“}</smal1></div><divclassName=”my-3w-50“>‹labelclassName="form-label">Entertopic</1abel><inputtype=”text“ name=”newTopic“placeholder=“Enterthetopic”className="form-control" role=“inputTopic"value={this.state.newTopic}testid=“invalidTopic">this.state.topicsArr.lengthonChange={this.changeFun}/>‹smallclassName="text-danger”data-{this.state.newToplc.trim().length ===0&&===0?"Topic is required":"“}‹/small›</div><buttonclassName=”btnbtn-success addAlign"role=“addTopicBtn” onClick={this.topicFun}disabled={this.state.newTopic.trim().length === 0}>+ Add Topic</button>‹buttonclassName=”btnbtn-success submitAlign"role="submitAgendaBtn” onClick={this.agendaFun}disabled={this.state.newTitle.trim().length0this.state.newDescription.trim().length0|| this.state.topicsArr.length‹/form>testid=“noTopicsMsg”>{this.state.topicsArr.length ===0&&<divclassName=”text-dangerml-2mt-5“No Topics Added</div>data-{this.state.topicsArr.length !==0&&<divclassName=”cardmy-3“><divclassName=”card-header“>AddedTopics</div> 


 Join our channel if you haven’t joined yethttps://t.me/fresco_miIestone( 
 </ul> </div><divclassName=”card-footer“>Refer the topics youadded</div></div></div>{this.state.showAgendaBlock &&<divclassName=”container” role=“viewAgenda"><buttonclassName=”btnbtn-info”role=“goToAdd“ onClick={this.checkAgendaFun}>Click{this.state.AddedAgenda.map(agenda=>{return(<divclassName=”cardmy-3”role=”cards“><divclassName=“card-header">{agenda.title}</div><divclassName="card-body"><ulclassName=“list-group”>{agenda.topics.map(topic=>{return(<liclassName=”list-group-item“>{topic}role=“topicList“>{topic}</li>‹divclassName=”card-body”><ulclassName="list-group“>{this.state.topicsArr.map(topic=>{return(<liclassName=“list-group-item“</li></ul></div><divclassName="card-footer">

 Join our channel if you haven’t joined yethttps://t.me/fresco milestone( @fresco_miIestone ){agenda.description}</div></div></div></div>exportdefaultApp;
Leave a Comment