Skip to content

Commit

Permalink
LRSFormAccordion build issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhila-aot committed Jan 23, 2025
1 parent 80843a0 commit 9d0ab45
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 41 deletions.
29 changes: 13 additions & 16 deletions frontend/src/app/components/landing/LRSFormAccordion.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
import { ReactJSXElement } from '@emotion/react/types/jsx-namespace'
import {Accordion} from 'react-bootstrap'

import { Accordion } from 'react-bootstrap'
import './LRSFormAccordion.css'



export type LRSForm = {
name:string,
copy:string,
url:string
name: string,
copy: string,
url: string
}

export const LRSFormAccordion = (forms:Array<LRSForm>):ReactJSXElement =>{
const accordionItems = forms.map((form,key) => (
AccordionItem(form,key.toString())
export const LRSFormAccordion = (forms: Array<LRSForm>): JSX.Element => {
const accordionItems = forms.map((form, key) => (
AccordionItem(form, key.toString())
))
return(
return (
<Accordion >
{accordionItems}
</Accordion>
)
}

const AccordionItem = (form:LRSForm,key:string):ReactJSXElement =>{
return(
<Accordion.Item id='accordion-item' className=' my-4 border' key={key} eventKey={key} >
const AccordionItem = (form: LRSForm, key: string): JSX.Element => {
return (
<Accordion.Item id='accordion-item' className=' my-4 border' key={key} eventKey={key} >
<Accordion.Header id="accordion-item-header" className='accordion-item-header'>
{form.name}
</Accordion.Header>
<Accordion.Body id="accordion-item-body">
<p>
{form.copy}
<br/>
<br />
<a href={form.url}> Please Click Here for the form </a>
</p>
</p>
</Accordion.Body>
</Accordion.Item>
)
Expand Down
33 changes: 8 additions & 25 deletions frontend/src/app/features/landing/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
import {LRSFormAccordion} from "../../components/landing/LRSFormAccordion"
import {Container, Row, Col} from 'react-bootstrap'
import jsonforms from "./forms.json"
import { FormFactory } from "../../helpers/factory/FormFactory"
import {ResponsiveNavigationSidebar} from "../../components/navigation/ResponsiveNavigationSidebar"
import { Container, Row, Col } from 'react-bootstrap'
import { LoginPanel } from "../../components/landing/LoginPanel"

const Landing = () =>{
const forms = FormFactory(jsonforms.forms)
return(
const Landing = () => {
return (
<Container fluid className="landing-container mt-3" id="landing-container">
<LoginPanel/>
{/* <Row id="responsive-lrs-nav" className="">
<Col className="col-12 col-md-3" >
<ResponsiveNavigationSidebar/>
</Col>
<Col className="col-12 col-md-7">
<Row>
<p className="h1">Sample Site Remediation Forms</p>
</Row>
<Row>
{LRSFormAccordion(forms)}
</Row>
</Col>
</Row> */}
<LoginPanel />
{ }

<Row>
<Col className="col-12 col-sm-6 offset-sm-3">
Expand All @@ -41,18 +24,18 @@ const Landing = () =>{
<p>These, as well as all other forms can be completed using the <a href="https://www2.gov.bc.ca/gov/content/environment/air-land-water/site-remediation/guidance-resources/forms">Site Remediation Forms</a></p>
</Col>


<Col className="col-12 col-sm-6 offset-sm-3 small">
<hr />
<p>Collection Notice for Environmental Protection Platform:</p>
<p>Your personal information is collected under 26(c) of the Freedom of Information and Protection of Privacy Act for the purpose of accessing services of the Environmental Protection Division. If you have any questions about the collection of your information, please contact Site Remediation Services at <a href="mailto:[email protected]">[email protected]</a>.</p>
<p>Collection Notice for Site Remediation Forms:</p>
<p>Your personal information is collected under 26(c) of the Freedom of Information and Protection of Privacy Act for the purpose of receiving site remediation services. If you have any questions about the collection of your information, please contact Site Remediation Services at <a href="mailto:[email protected]">[email protected]</a></p>
<p>Your personal information is collected under 26(c) of the Freedom of Information and Protection of Privacy Act for the purpose of receiving site remediation services. If you have any questions about the collection of your information, please contact Site Remediation Services at <a href="mailto:[email protected]">[email protected]</a></p>
</Col>
</Row>

</Container>
)
)
}


Expand Down

0 comments on commit 9d0ab45

Please sign in to comment.