-
Notifications
You must be signed in to change notification settings - Fork 1
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
External redirection links and warning #75
base: main
Are you sure you want to change the base?
External redirection links and warning #75
Conversation
…applied style to button directly Took 3 hours 30 minutes
Took 2 minutes
Took 54 seconds
…by a warning if it goes outside of the current site
Took 14 minutes
…nk component Took 26 minutes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import LButton from "@/components/LButton.vue"; | ||
import { ClassProp } from "class-variance-authority/types"; | ||
|
||
interface IProps extends /* @vue-ignore */ LinkHTMLAttributes {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface IProps extends /* @vue-ignore */ LinkHTMLAttributes {} | |
interface LLinkProps extends LinkHTMLAttributes {} |
|
||
withDefaults(defineProps<IProps & ClassProp>(), {}); | ||
|
||
const open = ref(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const open = ref(false); | |
const isOpen = ref(false); |
|
||
interface IProps extends /* @vue-ignore */ LinkHTMLAttributes {} | ||
|
||
withDefaults(defineProps<IProps & ClassProp>(), {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the ClassProp
?
<LLink href="/company">Company</LLink> | ||
<LLink href="/earn">Earn</LLink> | ||
<LLink href="/developer">Developer</LLink> | ||
<LLink href="/tokenomics">Tokenomics</LLink> | ||
<LLink href="/Litepaper_0624_v2.pdf" target="_blank">Litepaper</LLink> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of all of this, use LLink
when needed but for basic RouterLink
or <a>
it just adds useless complexity when reading the code
</p> | ||
<a href="https://app.uniswap.org/explore/tokens/base/0xf8b1b47aa748f5c7b5d0e80c726a843913eb573a?chain=base"> | ||
<LLink href="/design"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong link, you removed the Uniswap link
The objective is to add links when we are redirecting to websites completely external to LibertAI as discussed on Figma (for Aleph staking etc), but not for our own websites/social networks etc. Maybe rename |
This PR implement the warning modal before redirecting the user to an external site (including other libertai subdomains.
It also adds a utility component that automatically choose & based on the href