Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Croos3r
Copy link
Collaborator

@Croos3r Croos3r commented Jul 18, 2024

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

@Croos3r Croos3r added the enhancement New feature or request label Jul 18, 2024
@Croos3r Croos3r requested a review from RezaRahemtola July 18, 2024 15:50
@Croos3r Croos3r self-assigned this Jul 18, 2024
Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
libertai-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 3:50pm

import LButton from "@/components/LButton.vue";
import { ClassProp } from "class-variance-authority/types";

interface IProps extends /* @vue-ignore */ LinkHTMLAttributes {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
interface IProps extends /* @vue-ignore */ LinkHTMLAttributes {}
interface LLinkProps extends LinkHTMLAttributes {}


withDefaults(defineProps<IProps & ClassProp>(), {});

const open = ref(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const open = ref(false);
const isOpen = ref(false);


interface IProps extends /* @vue-ignore */ LinkHTMLAttributes {}

withDefaults(defineProps<IProps & ClassProp>(), {});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the ClassProp ?

Comment on lines +25 to +29
<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>
Copy link
Member

@RezaRahemtola RezaRahemtola Jul 20, 2024

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">
Copy link
Member

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

@RezaRahemtola
Copy link
Member

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 LLink to LAlertLink or similar and use it only for Aleph links on /earn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants