Skip to content

Commit

Permalink
Merge pull request #264 from CarmineOptions/feature/vite-migration
Browse files Browse the repository at this point in the history
Feature/vite migration
  • Loading branch information
DaveVodrazka authored Dec 4, 2024
2 parents 73a473b + 5190214 commit 7246d9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
18 changes: 4 additions & 14 deletions src/components/Portfolio/MyStake.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { UserPoolInfo } from "../../classes/Pool";
import { useStakes } from "../../hooks/useStakes";
import { openSidebar, setSidebarContent } from "../../redux/actions";
import { PoolSidebar } from "../Sidebar";
import { useConnectWallet } from "../../hooks/useConnectWallet";
import {
Button,
MajorMinorStacked,
P3,
P4,
TokenValueStacked,
} from "../common";
import { SecondaryConnectWallet } from "../ConnectWallet/Button";

const Item = ({ stake }: { stake: UserPoolInfo }) => {
const handleClick = () => {
Expand Down Expand Up @@ -95,20 +95,10 @@ export const MyStakeWithAccount = () => {
};

export const MyStake = () => {
const { account } = useAccount();
const { openWalletConnectModal } = useConnectWallet();
const { address } = useAccount();

if (!account) {
return (
<div>
<button
className="mainbutton primary active"
onClick={openWalletConnectModal}
>
Connect Wallet
</button>
</div>
);
if (!address) {
return <SecondaryConnectWallet msg="Connect wallet to see your stakes." />;
}

return <MyStakeWithAccount />;
Expand Down
2 changes: 1 addition & 1 deletion src/components/PriceGuard/PriceGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const PriceGuard = () => {
<H6 className="font-semibold">
Safeguard your holdings from major price movement
</H6>
<div className="flex gap-4">
<div className="flex flex-col gap-3 sm:flex-row sm:gap-4">
<Button
type="primary"
className="h-11 normal-case"
Expand Down
6 changes: 4 additions & 2 deletions src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ export const SidebarView = memo(
return (
<>
<div
className={`border-brand-deep border-l-[1px] ${width} box-border absolute top-0 overflow-hidden h-full z-40 bg-dark-container transition-all duration-1500 ease-in-out ${
sidebarOpen ? "right-0" : "w-[360px] lg:w-[360px] right-[-360px]"
className={`border-brand-deep border-l-[1px] box-border absolute top-0 overflow-hidden h-full z-40 bg-dark-container transition-all duration-1500 ease-in-out ${
sidebarOpen
? `block right-0 ${width}`
: "w-sidebar right-[-360px] invisible"
}`}
onClick={handleSidebarClick}
>
Expand Down

0 comments on commit 7246d9f

Please sign in to comment.