Rebuild-Black-Business / RBB-Website

Website to help connect black-owned businesses with consumers and resources
https://www.rebuildblackbusiness.com/
MIT License
119 stars 72 forks source link

Ensure business links are absolute #300

Closed JTSchwartz closed 4 years ago

JTSchwartz commented 4 years ago

Describe your PR

URLs are not verified to be in proper formatting, causing links enter without http/s protocol to attempt to route to a relative path within the rbb domain. This resolves the issue by ensuring an http:// protocol is present in the url

Pages/Interfaces that will change

Screenshots / video of changes

Before: RBB-AbsoluteURL-Before

After: RBB-AbsoluteURL-After

Steps to test

  1. Navigate to /business
  2. Hover over a link with a relative link (ex. Rebel Arts Movement Center)
  3. Check URL preview or click on link

Additional notes

netlify[bot] commented 4 years ago

Deploy request for rebuild-black-business accepted.

Accepted with commit 7c4e0f65d670533f4ba857aa9a97aec84b19046c

https://app.netlify.com/sites/rebuild-black-business/deploys/5f0fd7943c22bc00071bbb1b

magnificode commented 4 years ago

Thanks for taking this on @JTSchwartz! The code looks solid but is failing deploy. Here's the error:

https://gyazo.com/b29960ee011bda6c837f7d0a465aec5f

It looks like Placeholder URL is being output somehow 🤔

JTSchwartz commented 4 years ago

@magnificode thanks for pointing that out, could've sworn I saw green all the way down.

I moved where the verification is called so that it isn't attempted by skeleton loaders (where "Placeholder URL" is coming from) and it looks like that's all it needed.

racedale commented 4 years ago

@all-contributors please add JtSchwartz for code

allcontributors[bot] commented 4 years ago

@racedale

I've put up a pull request to add @JtSchwartz! :tada: