Skip to content
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

Setup image import correctly #38

Open
mattam opened this issue Sep 5, 2017 · 0 comments
Open

Setup image import correctly #38

mattam opened this issue Sep 5, 2017 · 0 comments

Comments

@mattam
Copy link
Contributor

mattam commented Sep 5, 2017

Because we need to import our static local files at build time, we need to use the switch/case statement to require() in the files.

To keep things clean, we should namespace our data/tours/tour_0/images files so that they are distinguishable from future tour_1 files.

so the files should be named:

tour_0_chez-maman.jpg
tour_0_location_0.png
tour_0_vive-la-tarte.jpg

Also clean the switch/case statement so that it uses the new path. (Eventually we'll have to setup a smarter function to take in the tour_num and the file_name and construct the correct path to return the image require() from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant