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. 🤔![No description](https://cdn.answeroverflow.com/1209164038894919710/image.png)
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?![No description](https://cdn.answeroverflow.com/1209188316256145500/image.png)
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 url![No description](https://cdn.answeroverflow.com/1209368520480264264/image.png)
no, 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
![No description](https://cdn.answeroverflow.com/1209370483158417418/image.png)
and removing the arrow function:
![No description](https://cdn.answeroverflow.com/1209370609155444766/image.png)
right before the anchor, there is an img tag with the same url, and that works as expected- image loads
![No description](https://cdn.answeroverflow.com/1209370782031945768/image.png)