-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from TritonSE/16-proposal-solution-component
Proposal Solution Component
- Loading branch information
Showing
20 changed files
with
700 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
|
||
import styles from "@/components/solution/accesibleClinics.module.css"; | ||
|
||
const AccesibleClinic: React.FC = () => { | ||
return ( | ||
<div className={styles.outerContainer}> | ||
<div className={styles.innerContainer}> | ||
<div className={styles.imageSection}> | ||
<img className={styles.image} alt="Accessible Clinics" src="/accesible_clinics.png" /> | ||
</div> | ||
<div className={styles.textSection}> | ||
<h2 className={styles.heading}>Accessible Clinics</h2> | ||
<p className={styles.description}> | ||
By strategically placing 10 clinics across the city of LA, pet owners no longer have to | ||
experience long drives during rush hour traffic with a frightened pet. | ||
</p> | ||
<p className={styles.description}> | ||
{" "} | ||
Additionally, clinics will offer <strong>free transport vans</strong> for clients | ||
without private transportation. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AccesibleClinic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from "react"; | ||
|
||
import styles from "@/components/solution/affordableSuergies.module.css"; | ||
|
||
const AffordableSurgeries: React.FC = () => { | ||
return ( | ||
<div className={styles.outerContainer}> | ||
<div className={styles.innerContainer}> | ||
<div className={styles.textSection}> | ||
<h2 className={styles.heading}>Affordable Surgeries</h2> | ||
<p className={styles.description}> | ||
Currently, procedures can range from $400 to $900. By adopting a high volume, low cost | ||
business model, Spay.LA can bring procedures prices down to just $50. | ||
</p> | ||
<p className={styles.description}> | ||
Additionally, we will offer a <strong>voucher program</strong> for low income families | ||
and their pets. | ||
</p> | ||
</div> | ||
<div className={styles.imageSection}> | ||
<img | ||
className={styles.image} | ||
alt="Affordable Surgeries" | ||
src="/affordable_surgeries.png" | ||
></img> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AffordableSurgeries; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
"use client"; | ||
|
||
import { | ||
BarElement, | ||
CategoryScale, | ||
Chart, | ||
ChartOptions, | ||
Legend, | ||
LinearScale, | ||
Title, | ||
Tooltip, | ||
} from "chart.js"; | ||
import ChartDataLabels from "chartjs-plugin-datalabels"; | ||
import React, { useEffect, useRef, useState } from "react"; | ||
import { Bar } from "react-chartjs-2"; | ||
|
||
import styles from "@/components/solution/appointments.module.css"; | ||
|
||
Chart.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend, ChartDataLabels); | ||
|
||
const Appointments: React.FC = () => { | ||
const data = { | ||
labels: [ | ||
["Other", "Clinics"], | ||
["Spay.LA", "Clinics"], | ||
], | ||
datasets: [ | ||
{ | ||
label: "Dataset 1", | ||
data: [11520, 28000], | ||
backgroundColor: ["#2D5177", "#ff8359"], | ||
borderColor: ["#2D5177", "#ff8359"], | ||
borderWidth: 1, | ||
barThickness: 80, | ||
}, | ||
], | ||
}; | ||
|
||
const options: ChartOptions<"bar"> = { | ||
maintainAspectRatio: false, | ||
layout: { | ||
padding: { | ||
top: 75, | ||
}, | ||
}, | ||
animations: { | ||
y: { | ||
type: "number", | ||
duration: 2000, | ||
easing: "easeOutCubic", // Smooth acceleration & deceleration | ||
}, | ||
}, | ||
plugins: { | ||
tooltip: { | ||
enabled: false, | ||
}, | ||
legend: { | ||
display: false, | ||
}, | ||
datalabels: { | ||
anchor: "end", | ||
align: "top", | ||
offset: 5, | ||
color: ["#2D5177", "#ff8359"], | ||
font: { | ||
size: 24, | ||
weight: "bold", | ||
family: "Montserrat", | ||
}, | ||
formatter: (value: number) => value.toLocaleString(), // Format numbers with commas | ||
}, | ||
}, | ||
scales: { | ||
x: { | ||
grid: { | ||
drawOnChartArea: false, | ||
}, | ||
ticks: { | ||
color: "black", | ||
font: { | ||
size: 20, | ||
family: "Montserrat", | ||
}, | ||
}, | ||
}, | ||
y: { | ||
grid: { | ||
display: false, | ||
}, | ||
display: false, | ||
beginAtZero: true, | ||
}, | ||
}, | ||
}; | ||
|
||
const chartRef = useRef<HTMLDivElement | null>(null); | ||
const [chartKey, setChartKey] = useState(0); | ||
const [hasAnimated, setHasAnimated] = useState(false); // Track if animation has occurred | ||
|
||
useEffect(() => { | ||
const observer = new IntersectionObserver( | ||
(entries) => { | ||
entries.forEach((entry) => { | ||
if (entry.isIntersecting) { | ||
setChartKey((prevKey) => prevKey + 1); // Forces chart re-render | ||
setHasAnimated(true); // Mark animation as done | ||
observer.unobserve(entry.target); // Stop observing after animation | ||
} | ||
}); | ||
}, | ||
{ threshold: 0.5 }, // Trigger when 50% of the chart is visible | ||
); | ||
|
||
if (chartRef.current) { | ||
observer.observe(chartRef.current); | ||
} | ||
|
||
return () => { | ||
if (chartRef.current) { | ||
observer.unobserve(chartRef.current); | ||
} | ||
}; | ||
}, [hasAnimated]); | ||
|
||
return ( | ||
<div className={styles.outerContainer}> | ||
<div className={styles.innerContainer}> | ||
<div className={styles.textSection}> | ||
<h2 className={styles.heading}>Available Appointments</h2> | ||
<p className={styles.description}> | ||
By operating 5 days a week with day and night shifts, | ||
<br /> Spay.LA can perform almost | ||
<span style={{ fontWeight: "bold" }}> triple the surgeries</span> of <br /> other | ||
clinics in LA. | ||
<br /> | ||
<br /> | ||
This means more surgeries and less time waiting for <br /> an available appointment. | ||
</p> | ||
</div> | ||
<div ref={chartRef} className={styles.graphSection}> | ||
<p className={styles.graphTitle}>Surgeries Per Year</p> | ||
<Bar key={chartKey} data={data} options={options} /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Appointments; |
Oops, something went wrong.