Skip to content

Commit

Permalink
Merge pull request #234 from FrancoAguzzi/fix/semantic-release-config
Browse files Browse the repository at this point in the history
fix: fix build issues
  • Loading branch information
FrancoAguzzi authored Mar 19, 2024
2 parents a031e9e + 9e59463 commit e6aee01
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 36 deletions.
2 changes: 1 addition & 1 deletion components/01-atoms/NetworkDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const NetworkDropdown = ({ forAuthedUser }: NetworkDropdownProps) => {
};

interface NetworkProps {
icon: React.JSX.Element;
icon: JSX.Element;
name: string;
}

Expand Down
2 changes: 1 addition & 1 deletion components/01-atoms/SwapModalButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function SwapModalButton({
}: Props) {
const { approvedTokensCount } = useContext(SwapContext);
const { theme } = useTheme();
if (theme === undefined) return false;
if (theme === undefined) return <></>;

return (
<button
Expand Down
2 changes: 1 addition & 1 deletion components/01-atoms/icons/ArrowIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ export const ArrowIcon = ({
),
};

return ArrowIcons[variant];
return ArrowIcons[variant] || <></>;
};
8 changes: 3 additions & 5 deletions components/01-atoms/icons/CloseCTA.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import { SVGProps } from "react";

interface CloseCTAProps {
onClick: () => void;
props?: SVGProps<SVGSVGElement>;
className?: string;
}

export const CloseCTA = ({ onClick, props }: CloseCTAProps) => {
export const CloseCTA = ({ onClick, className }: CloseCTAProps) => {
return (
<button
onClick={onClick}
className="p-2 rounded-full border border-[#353836] dark:hover:bg-[#353836] hover:bg-zinc-200 transition"
>
<svg
{...props}
width="14"
height="14"
viewBox="0 0 14 14"
fill={"currentColor"}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
<g id="xmark-solid 1">
Expand Down
2 changes: 1 addition & 1 deletion components/01-atoms/icons/NetworkIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ export const NetworkIcon = ({
),
};

return NetworkIcons[variant];
return NetworkIcons[variant] || <></>;
};
2 changes: 1 addition & 1 deletion components/01-atoms/icons/SwapIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ export const SwapIcon = ({
),
};

return SwapIcons[variant];
return SwapIcons[variant] || <></>;
};
2 changes: 1 addition & 1 deletion components/02-molecules/ConfirmSwapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,5 @@ export const ConfirmSwapModal = ({
),
};

return ConfirmSwapModalStep[currentSwapModalStep];
return ConfirmSwapModalStep[currentSwapModalStep] || <></>;
};
2 changes: 1 addition & 1 deletion components/02-molecules/TokensList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const TokensList = ({

const addTokenSquare = withAddTokenCard ? AddTokenCardManually() : <></>;

const Layout = (squares: React.JSX.Element[]) => {
const Layout = (squares: JSX.Element[]) => {
return (
<div className={gridClassNames}>
{squares}
Expand Down
49 changes: 25 additions & 24 deletions components/02-molecules/UserOfferInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const UserOfferInfo = ({
ensAddress: address,
});
const displayAddress = address?.getEllipsedAddress();

return variant == UserOfferVariant.DEFAULT ? (
<div>
<div className="flex gap-2">
Expand All @@ -36,38 +37,38 @@ export const UserOfferInfo = ({
</div>
</div>
</div>
) : (
variant === UserOfferVariant.SECONDARY && (
<div>
<div className="flex justify-between">
<div className="flex gap-2">
<div>
{address && (
<ENSAvatar
avatarENSAddress={address}
size={ENSAvatarSize.SMALL}
/>
)}
</div>
<div className="flex ">
{primaryName ? (
<p>{primaryName} gets</p>
) : (
<p>{displayAddress} gets</p>
)}
</div>
) : variant === UserOfferVariant.SECONDARY ? (
<div>
<div className="flex justify-between">
<div className="flex gap-2">
<div>
{address && (
<ENSAvatar
avatarENSAddress={address}
size={ENSAvatarSize.SMALL}
/>
)}
</div>
<div className="flex ">
{primaryName ? (
<p>{primaryName} gets</p>
) : (
<p>{displayAddress} gets</p>
)}
</div>
{/* TODO > Include logic to calculate tokens value */}
{/* <div className="flex-row flex">
</div>
{/* TODO > Include logic to calculate tokens value */}
{/* <div className="flex-row flex">
<p className="dark:p-small-dark p-small-variant-black">
0.1639 ETH
</p>
<p className="dark:p-small-dark dark:!text-[#A3A9A5] p-small-variant-black">
&nbsp; ($252.15)
</p>
</div> */}
</div>
</div>
)
</div>
) : (
<></>
);
};
1 change: 1 addition & 0 deletions lib/client/hooks/usePonder.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/exhaustive-deps */
import { SwapContext } from "@/components/01-atoms";
import axios from "axios";
import { useContext, useEffect, useState } from "react";
Expand Down
120 changes: 120 additions & 0 deletions package-lock.json

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

0 comments on commit e6aee01

Please sign in to comment.