-
Notifications
You must be signed in to change notification settings - Fork 3
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
change check for if a file is shareable #439
Changes from 3 commits
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ import { VIEWER_PATHNAME } from "../../routes"; | |
import TRAJECTORIES from "../../constants/networked-trajectories"; | ||
|
||
import styles from "./style.css"; | ||
import { URL_PARAM_KEY_FILE_NAME } from "../../constants"; | ||
|
||
interface ViewerTitleProps { | ||
simulariumFileName: string; | ||
|
@@ -27,7 +28,10 @@ const ViewerTitle: React.FunctionComponent<ViewerTitleProps> = ( | |
// networked-trajectories.ts to get its version info | ||
// TODO: Eventually we should put all the contents of networked-trajectories.ts in the | ||
// Simularium files themselves | ||
const trajectoryId = location.search.replace("?trajFileName=", ""); | ||
const trajectoryId = location.search.replace( | ||
`?${URL_PARAM_KEY_FILE_NAME}=`, | ||
"" | ||
); | ||
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. just noticed the constant wasn't being used here |
||
const currentTrajectory = TRAJECTORIES.find( | ||
(trajectory) => trajectory.id === trajectoryId | ||
); | ||
|
meganrm marked this conversation as resolved.
Show resolved
Hide resolved
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. The only major change to this file is the function at the very bottom. The other changes are formatting and I used a constant where we had a string before. |
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.
I noticed we had a selector for this, so I swapped it out