BYTE-ADMU / itech-ui

ITECH is an online resource library that serves as a learning accelerator to lead the process of Building Young Tech Entrepreneurs. || This repository is the frontend of the ITECH web app.
https://byteitech.com
0 stars 0 forks source link

Hotfix: Direct Routing Fix #104 #105

Closed njtalba5127 closed 3 years ago

njtalba5127 commented 3 years ago

ATTEMPT FAILED:

Approach Idea: An if else statement exists within articles/[id].vue page to determine if the store is already loaded or not.

if it is not yet loaded, the article page will then use the id from the router wherever the user wants to go, and use axios to get the specific article with that id. When the store is done loading, then the article page will get instead from the vuex store, no longer needing to get data and wait for server's response.

This approach unfortunately did not work because of the SSG nature of gridsome (only prerender the markup once the api is received). However no api is yet received, hence resulting to the user being led to a not found page.

Another approach is then needed to address this problem. :<<

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/wenzani/itech-test/BtDNDjCYLeRrQ4jjxMrSmoiedKta
✅ Preview: https://itech-test-git-nelly-hotfixdirect-routing-fix104-wenzani.vercel.app