Skip to content

Commit

Permalink
header bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
VoroninDima committed Oct 12, 2023
1 parent aecadda commit 0cb2aa6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airdao/ui-library",
"version": "1.0.9",
"version": "1.1.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
Expand Down
18 changes: 17 additions & 1 deletion src/components/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,18 @@
}
}

.address-info__address {
color: #0E0E0E;
text-align: center;
/* WEB/Body 2/500 - Medium */
font-family: Inter, sans-serif;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 24px; /* 150% */
letter-spacing: -0.16px;
}

.address-info__label {
color: #A1A6B2;
font-weight: 700;
Expand All @@ -348,10 +360,14 @@

.address-info__check {
position: relative;
top: 2px;
top: 4px;
margin-right: 4px;
}

.address-info__check-copy {
height: 20px;
}

.address-info__copy {
position: relative;
cursor: pointer;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header/components/AddressInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function AddressInfo({ address, logout, close, isOpen }: AddressI
const copy = () => {
navigator.clipboard.writeText(address);
setCopied(true);
setTimeout(() => setCopied(false), 2000)
setTimeout(() => setCopied(false), 20000)
}

return (
Expand All @@ -42,7 +42,7 @@ export default function AddressInfo({ address, logout, close, isOpen }: AddressI
<svg
width={24}
height={24}
className={styles['address-info__check']}
className={styles['address-info__check-copy']}
fill="none"
xmlns="http://www.w3.org/2000/svg"
style={!copied ? {display: 'none'} : {}}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header/components/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function MobileMenu ({ close, isOpen, data, balance }: MobileMenuProps) {
</div>
<div className={s['mobile-menu__sublist-content']}>
{submenu.content.map((item) => (
<a href={asText(item.url)} key={item.name} className={s['mobile-menu__sublist-link']}>
<a href={item.url} target={item.target} key={item.name} className={s['mobile-menu__sublist-link']}>
<PrismicText field={item.name} />
</a>
))}
Expand All @@ -53,7 +53,7 @@ export function MobileMenu ({ close, isOpen, data, balance }: MobileMenuProps) {
</div>
<div className={s['mobile-menu__socials-content']}>
{data && data.socials.map((social) => (
<a href={asText(social.url)} target={'_blank'} className={s['mobile-menu__socials-link']}>
<a href={social.url} target={social.target} className={s['mobile-menu__socials-link']}>
<PrismicImage field={social.img} className={s['mobile-menu__social-img']} />
</a>
))}
Expand Down
7 changes: 4 additions & 3 deletions src/components/Header/usePrismicData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ export function usePrismicData() {

const socials = slices.pop().items.map((item) => ({
img: item.navitemimg,
url: item.navitemurl,
url: item.navitemlink.url,
target: item.navitemlink.target,
}));


const submenus = slices.map((slice) => {
const content = slice.items.map((item) => ({
name: item.navitemlabel,
url: item.navitemurl,
url: item.navitemlink.url,
target: item.navitemlink.target,
}))
return {
name: slice.primary.navlabel,
Expand All @@ -37,5 +39,4 @@ export function usePrismicData() {
socials,
submenus,
}

}

0 comments on commit 0cb2aa6

Please sign in to comment.