Skip to content

Commit

Permalink
fix: ami chart selection bug (#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyjablonski authored Dec 23, 2024
1 parent e5221a8 commit 7fcf933
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions api/prisma/seed-staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ export const stagingSeed = async (
const amiChart = await prismaClient.amiChart.create({
data: amiChartFactory(10, jurisdiction.id),
});
await prismaClient.amiChart.create({
data: amiChartFactory(8, additionalJurisdiction.id),
});
const NUM_AMI_CHARTS = 5;
for (let index = 0; index < NUM_AMI_CHARTS; index++) {
await prismaClient.amiChart.create({
data: amiChartFactory(8, additionalJurisdiction.id),
});
}
// Create map layers
await prismaClient.mapLayers.create({
data: mapLayerFactory(jurisdiction.id, 'Redlined Districts', redlinedMap),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const UnitForm = ({ onSubmit, onClose, defaultUnit, nextId, draft }: UnitFormPro
useEffect(() => {
void resetDefaultValues()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
}, [amiCharts])

const fetchAmiChart = async (defaultChartID?: string) => {
try {
Expand Down

0 comments on commit 7fcf933

Please sign in to comment.