Anchor with target="_blank" leading to app's URL
I have a link with the
href
set to an external link for an image. When clicking on this link, a new tab should load the image with given URL.
However, instead of loading the image's url, it loads the apps url.. what might be the issue?
Hovering the link shows the correct URL at the bottom left corner of the browser, as shown in the screenshot attached in this post. 🤔12 Replies
solid-start intercepts all anchor elements afaik and that's what is causing the issue
You can try this solution
https://discord.com/channels/722131463138705510/910635844119982080/1205466350529814539
Using
rel="external"
I attempted to use
rel
however that failed to work 🤔
then I thought I might need to update the package to latest version.. and to my surprise, it broke 👀 😄
Any idea how I could return a component instead of an element from allowAuthenticated
denyAuthenticated
functions?I attempted to return
Navigate({ href: "..." })
but that doesn't seem to return anything :/does the jsx way not work like you have in
denyAuthenticated
?
I think you can do return () => <Navigate/>
You were right :prayge:
thank you Reee, that works
:PepeHands: this still fails
The following doesn't work:
But this works:
So I thought the URL might be wrong and console log'ed
store.imageModal.url
, and it was the correct URL
this gives
"() => store.imageModal.url"
as a string in the urlno, i wrote this:
and typescript error saying that's not compatible :
Type '() => string' is not assignable to type 'string'.ts(2322)
.tsx
file ✅it is indeed set
and removing the arrow function:
right before the anchor, there is an img tag with the same url, and that works as expected- image loads