Skip to content

Commit

Permalink
Rename a few more isDUPs that the vscode refactor tool missed
Browse files Browse the repository at this point in the history
  • Loading branch information
jzimbel-mbta committed Aug 28, 2023
1 parent 284a5ca commit 4189456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/src/apps/v2/dup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import PageLoadNoData from "Components/v2/dup/page_load_no_data";
import NoData from "Components/v2/dup/no_data";
import OvernightDepartures from "Components/v2/dup/overnight_departures";
import { usePlayerName } from "Hooks/outfront";
import { isDUP } from "Util/outfront";
import { isDup } from "Util/outfront";

const TYPE_TO_COMPONENT = {
screen_normal: NormalScreen,
Expand Down Expand Up @@ -123,7 +123,7 @@ const responseMapper: ResponseMapper = (apiResponse) => {
};

const App = (): JSX.Element => {
if (isDUP()) {
if (isDup()) {
const playerName = usePlayerName()!;
const id = `DUP-${playerName.trim()}`;
return (
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/v2/dup/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DUP app packaging v2

- Ensure [Corsica](https://hexdocs.pm/corsica/Corsica.html) is used on the server to allow CORS requests (ideally limited to just the DUP-relevant routes). It should already be configured at [this line](/lib/screens_web/controllers/v2/screen_api_controller.ex#L9) in the API controller--if it is, you don't need to do anything for this step.
- Double check that any behavior specific to the DUP screen environment happens inside of an `isDUP()` or `isOFM()` check. This includes:
- Double check that any behavior specific to the DUP screen environment happens inside of an `isDup()` or `isOFM()` check. This includes:
- `buildApiPath` in use_api_response.tsx should return a full URL for the API path: prefix `apiPath` string with "https://screens.mbta.com".
- `imagePath` in util.tsx should return relative paths (no leading `/`).
- Create priv/static/dup-app.html if it doesn’t already exist. Copy paste the following contents in:
Expand Down

0 comments on commit 4189456

Please sign in to comment.