Skip to content

Commit

Permalink
Make social links clickable + Hide “ads” section BAL-3220 (#2907)
Browse files Browse the repository at this point in the history
* chore: hide ads sections; add href attribute to anchor-if-url component

* chore: release version

---------

Co-authored-by: Tomer Shvadron <[email protected]>
  • Loading branch information
MatanYadaev and tomer-shvadron authored Dec 24, 2024
1 parent 19fcf9f commit 3b32e39
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 24 deletions.
7 changes: 7 additions & 0 deletions apps/kyb-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# kyb-app

## 0.3.95

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.5.52

## 0.3.94

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions apps/kyb-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/kyb-app",
"private": true,
"version": "0.3.94",
"version": "0.3.95",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -17,7 +17,7 @@
"dependencies": {
"@ballerine/blocks": "0.2.30",
"@ballerine/common": "^0.9.59",
"@ballerine/ui": "0.5.51",
"@ballerine/ui": "0.5.52",
"@ballerine/workflow-browser-sdk": "0.6.78",
"@lukemorales/query-key-factory": "^1.0.3",
"@radix-ui/react-icons": "^1.3.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/react-pdf-toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @ballerine/react-pdf-toolkit

## 1.2.52

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.5.52

## 1.2.51

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-pdf-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/react-pdf-toolkit",
"private": false,
"version": "1.2.51",
"version": "1.2.52",
"types": "./dist/build.d.ts",
"main": "./dist/react-pdf-toolkit.js",
"module": "./dist/react-pdf-toolkit.mjs",
Expand All @@ -27,7 +27,7 @@
},
"dependencies": {
"@ballerine/config": "^1.1.28",
"@ballerine/ui": "0.5.51",
"@ballerine/ui": "0.5.52",
"@react-pdf/renderer": "^3.1.14",
"@sinclair/typebox": "^0.31.7",
"ajv": "^8.12.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/ui

## 0.5.52

### Patch Changes

- add href attribute to anchor-if-url component

## 0.5.51

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/ui",
"private": false,
"version": "0.5.51",
"version": "0.5.52",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const AnchorIfUrl: TAnchorIfUrl = forwardRef(

if (checkIsUrl(children)) {
return (
<BallerineLink ref={ref} {...props}>
<BallerineLink ref={ref} href={children} {...props}>
{children}
</BallerineLink>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { FunctionComponent } from 'react';
import { Card, CardContent, CardHeader } from '@/components';
import { TextWithNAFallback } from '@/components/atoms/TextWithNAFallback';
import { ctw } from '@/common';
import { AdExample } from '../AdExample';
import { AdImageWithLink } from '../AdImageWithLink';
import { toTitleCase } from 'string-ts';
import { AnchorIfUrl } from '@/components/atoms/AnchorIfUrl';
Expand Down Expand Up @@ -87,18 +86,19 @@ export const AdsAndSocialMedia: FunctionComponent<{
</div>
</CardContent>
</Card>
<Card>
<CardHeader className={'pt-4 font-bold'}>Related Ads</CardHeader>
<CardContent className={'flex flex-col space-y-4'}>
<div className={'grid grid-cols-[400px_400px] gap-8'}>
{!!relatedAdsImages?.length &&
relatedAdsImages.map(({ src, link }, index) => (
<AdExample key={src} src={src} link={link} alt={`Ad Example ${index + 1}`} />
))}
{!relatedAdsImages?.length && <>No ads detected.</>}
</div>
</CardContent>
</Card>
{/*Hiding this for now, will be added back in later*/}
{/*<Card>*/}
{/* <CardHeader className={'pt-4 font-bold'}>Related Ads</CardHeader>*/}
{/* <CardContent className={'flex flex-col space-y-4'}>*/}
{/* <div className={'grid grid-cols-[400px_400px] gap-8'}>*/}
{/* {!!relatedAdsImages?.length &&*/}
{/* relatedAdsImages.map(({ src, link }, index) => (*/}
{/* <AdExample key={src} src={src} link={link} alt={`Ad Example ${index + 1}`} />*/}
{/* ))}*/}
{/* {!relatedAdsImages?.length && <>No ads detected.</>}*/}
{/* </div>*/}
{/* </CardContent>*/}
{/*</Card>*/}
</div>
);
};
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b32e39

Please sign in to comment.