Skip to content

Commit

Permalink
refactor: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyscode committed Dec 11, 2024
1 parent 40f56c8 commit ce99aaf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/[lng]/swap/[segments]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default async function Page({
<SwapPage
sourceChain={sourceChain}
sourceToken={sourceToken}
destinationChain={sourceChain}
destinationToken={destinationToken}
tokens={tokens}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/app/ui/swap/SwapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import StepsExplainerSection from './SwapStepsExplainer';

interface SwapPageProps {
sourceChain: ExtendedChain;
destinationChain: ExtendedChain;
tokens: TokensResponse['tokens'];
sourceToken?: Token;
destinationToken?: Token;
Expand Down Expand Up @@ -41,6 +42,7 @@ const BridgePage = ({
<StepsExplainerSection
sourceChain={sourceChain}
sourceToken={sourceToken}
destinationChain={sourceChain}
destinationToken={destinationToken}
/>

Expand Down
6 changes: 6 additions & 0 deletions src/app/ui/swap/SwapStepsExplainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import { getWidgetImageProps } from 'src/utils/image-generation/getWidgetImage';

interface SwapStepsExplainerProps {
sourceChain: ExtendedChain;
destinationChain: ExtendedChain;
sourceToken?: Token;
destinationToken?: Token;
}

const SwapStepsExplainerSection = ({
sourceChain,
destinationChain,
sourceToken,
destinationToken,
}: SwapStepsExplainerProps) => {
Expand Down Expand Up @@ -43,6 +45,7 @@ const SwapStepsExplainerSection = ({
img: getWidgetImageProps({
sourceToken,
sourceChain,
destinationChain,
destinationToken,
theme,
widgetImageProps: {
Expand Down Expand Up @@ -70,6 +73,7 @@ const SwapStepsExplainerSection = ({
img: getWidgetImageProps({
sourceToken,
sourceChain,
destinationChain,
destinationToken,
theme,
widgetImageProps: {
Expand Down Expand Up @@ -100,6 +104,7 @@ const SwapStepsExplainerSection = ({
img: getWidgetImageProps({
sourceToken,
sourceChain,
destinationChain,
destinationToken,
theme,
widgetImageProps: {
Expand Down Expand Up @@ -133,6 +138,7 @@ const SwapStepsExplainerSection = ({
img: getWidgetImageProps({
sourceToken,
sourceChain,
destinationChain,
destinationToken,
theme,
widgetImageProps: {
Expand Down
11 changes: 10 additions & 1 deletion src/components/AvatarBadge/NoMUI/AvatarBadgeNoMUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,16 @@ export const AvatarBadgeNoMUI = ({
}}
/>
) : (
<AvatarSkeleton width={badgeSize} height={badgeSize} />
<AvatarSkeleton
width={badgeSize}
height={badgeSize}
sx={{
position: 'absolute',
bottom: 0,
right: 0,
transform: `translate(${badgeOffset?.x ? badgeOffset.x : 0}px, ${badgeOffset?.y ? badgeOffset.y : 0}px)`,
}}
/>
)}
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/ImageGeneration/Fields/TokenField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const TokenField = ({
fullWidth?: boolean;
}) => {
// Function to calculate top offset based on conditions

const fieldContainerStyle = fieldContainerStyles();
return (
<div style={{ display: 'flex', width: fullWidth ? 368 : 174 }}>
Expand Down

0 comments on commit ce99aaf

Please sign in to comment.