File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -973,15 +973,16 @@ Producthunt item
973973 border-radius : 4px ;
974974}
975975.adCardPlaceholder {
976- max- width: 300px ;
976+ width : 300px ;
977977 column-gap : 16px ;
978978 display : flex;
979979 flex-direction : row;
980+ margin : 0 auto;
980981}
981982.adCardPlaceholder .image {
982983 background : var (--placeholder-background-color );
983- flex : 0 0 120 px ;
984- height : 90 px
984+ flex : 0 0 130 px ;
985+ height : 100 px
985986}
986987
987988.floatingFilter {
Original file line number Diff line number Diff line change 2424 display : block;
2525 overflow : hidden;
2626}
27- # bannerads .carbon- wrap {
27+ # bannerads .wrap {
2828 display : flex;
2929}
30- # bannerads .carbon- img {
30+ # bannerads .img {
3131 display : block;
3232 margin : 0 ;
3333 line-height : 1 ;
3434}
35- # bannerads .carbon- img img {
35+ # bannerads .img img {
3636 display : block;
3737}
38- # bannerads .carbon- text {
38+ # bannerads .text {
3939 font-size : 13px ;
4040 padding : 10px ;
4141 margin-bottom : 16px ;
4242 line-height : 1.5 ;
4343 text-align : left;
4444}
45- # bannerads .carbon- poweredby {
45+ # bannerads .poweredby {
4646 display : block;
4747 padding : 6px 8px ;
4848 background : inherit;
Original file line number Diff line number Diff line change 11import './BannerAd.css'
22import { useGetAd } from '../api/getAd'
3+ import { AdPlaceholder } from 'src/components/placeholders'
34
45export const BannerAd = ( ) => {
5- const { data : ad , isError } = useGetAd ( {
6+ const {
7+ data : ad ,
8+ isLoading,
9+ isError,
10+ } = useGetAd ( {
611 config : {
712 cacheTime : 0 ,
813 staleTime : 0 ,
9- }
14+ } ,
1015 } )
1116
17+ if ( isLoading ) {
18+ return < AdPlaceholder />
19+ }
20+
1221 if ( isError || ! ad ) {
1322 return null
1423 }
You can’t perform that action at this time.
0 commit comments