-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace hardcoded keys with the centralized list of Airtable keys #153
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import HouseholdSizeChip from "./HouseholdSizeChip"; | |
import DrivingClusterChip from "./DrivingClusterChip"; | ||
import { daysSinceSlackMessage } from "../helpers/time"; | ||
import ClusterMapContext from "../context/ClusterMapContext"; | ||
import { fields } from "../../lib/airtable/tables/requests"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here: the absolute path (with or without tilde) didn't work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly this is old news, but after looking over it, it looks like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, it looks like most of the other scripts in our |
||
|
||
const useStyles = makeStyles((theme) => ({ | ||
divider: { | ||
|
@@ -70,17 +71,17 @@ const RequestPopup = ({ requests, closePopup }) => { | |
underline="always" | ||
target="_blank" | ||
> | ||
{meta["First Name"] || ""} | ||
{meta[fields.firstName] || ""} | ||
</Link> | ||
) : ( | ||
meta["First Name"] | ||
meta[fields.firstName] | ||
)} | ||
</Typography> | ||
|
||
<Typography variant="body1"> | ||
{meta["Cross Street #1"]} | ||
{meta[fields.crossStreetFirst]} | ||
{" and "} | ||
{meta["Cross Street #2"]} | ||
{meta[fields.crossStreetSecond]} | ||
</Typography> | ||
|
||
<Typography variant="body2"> | ||
|
@@ -91,9 +92,9 @@ const RequestPopup = ({ requests, closePopup }) => { | |
</Typography> | ||
|
||
<Box className={classes.chipRow}> | ||
<HouseholdSizeChip size={meta["Household Size"]} /> | ||
<HouseholdSizeChip size={meta[fields.householdSize]} /> | ||
|
||
{meta["For Driving Clusters"] && <DrivingClusterChip />} | ||
{meta[fields.forDrivingClusters] && <DrivingClusterChip />} | ||
|
||
{meta.slackPermalink ? ( | ||
<DaysOpenChip daysOpen={daysSinceSlackMessage(meta.slackTs)} /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason I had to make this a relative path. The tilde path threw an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very weird! do you remember the error? this should be currently in prod right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, super weird! The version with the tilde path is in prod, which proves that it works. Maybe this is just user error on my part.
Here's the error:
Module not found: Can't resolve '~airtable/bases' in '/Users/emmasmith/projects/mutual-aid-app/src/lib/airtable/tables'
I see this when I run
npm run local:react
. Also when I try to build for prod usingnpm run build
. The Express app runs just fine. It seems that the React side of things is not respecting themoduleAliases
.Clues, advice, guidance most appreciated :)