Skip to content

Commit

Permalink
fixes done
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitmalhotra1420 committed Dec 10, 2024
1 parent a7c82ac commit 6c63a1e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
26 changes: 20 additions & 6 deletions common/components/ChainAlertBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,35 @@ import styled from 'styled-components';
import { Front, Sale } from '../../blocks';

type AlertBarProps = {
text: string;
url?: string;
textPrefix?: string;
bannerText: string;
bannerURL: string;
bannerTextPrefix?: string;
prefixURL;
};

const ChainAlertBar = ({ text, url, textPrefix }: AlertBarProps) => {
const ChainAlertBar = ({
bannerText,
bannerURL,
bannerTextPrefix,
prefixURL,
}: AlertBarProps) => {
return (
<HeroButton
onClick={() => {
if (url) window.open(url, '_blank');
if (bannerURL) window.open(bannerURL, '_blank');
}}
>
<Sale size={16} color="icon-brand-subtle" />
<AlertText>
<AlertTextPrefix>{textPrefix}</AlertTextPrefix> {text}
<AlertTextPrefix
onClick={(e) => {
e.stopPropagation();
window.open(prefixURL, '_blank');
}}
>
{bannerTextPrefix}
</AlertTextPrefix>{' '}
{bannerText}
</AlertText>
<Front size={16} color="icon-brand-subtle" />
</HeroButton>
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ export default function Navbar() {
gap={{ initial: 'spacing-sm', ml: 'spacing-none' }}
margin={{ ml: 'spacing-xxs' }}
>
{asPath !== '/dashboard' && (
{/* {asPath !== '/dashboard' && (
<Link href="https://push.org/chain/ecosystem" target="_blank">
<Text variant="h6-semibold" color="text-primary">
App Ecosystem
</Text>
</Link>
)}
)} */}

<DarkModeSwitch
style={{ margin: '0 1rem' }}
Expand Down
7 changes: 4 additions & 3 deletions sections/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const Home = () => {
gap="spacing-lg"
>
<ChainAlertBar
text="Governance Proposal is Live! Vote today to bring Push Chain to reality."
url="https://gov.push.org"
textPrefix="Push Chain"
bannerText="Governance Proposal is Live! Vote today to bring Push Chain to reality."
bannerURL="https://gov.push.org"
bannerTextPrefix="Push Chain"
prefixURL="https://push.org/chain"
/>
<Box
width="-webkit-fill-available"
Expand Down

0 comments on commit 6c63a1e

Please sign in to comment.