Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/bex/mobile UI #217

Draft
wants to merge 2 commits into
base: v2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/hub/src/app/pools/PoolsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ export const PoolSearch = ({
id="poolstable"
>
<Tabs className="flex flex-col gap-4" value={poolType}>
<div className="flex w-full flex-col items-start justify-between gap-2 lg:flex-row lg:items-center">
<div className="flex w-full flex-col items-start justify-between gap-x-2 gap-y-8 lg:flex-row lg:items-center">
<TabsList className="w-full justify-start p-0" variant="ghost">
<TabsTrigger
value="allPools"
className="w-full sm:w-fit"
variant="ghost"
variant="compact"
onClick={handleClearSearch}
>
<Link href="/pools?pool=allPools">All Pools</Link>
</TabsTrigger>
<TabsTrigger
value="userPools"
className="w-full sm:w-fit"
variant="ghost"
variant="compact"
onClick={handleClearSearch}
>
<Link href="/pools/?pool=userPools">My Pools</Link>
</TabsTrigger>
</TabsList>

<TabsContent value="allPools" className="w-full text-center">
<div className="flex w-full flex-col gap-3 sm:flex-row sm:items-center">
<div className="flex w-full gap-y-3 gap-x-6 sm:items-center">
<SearchInput
value={search}
onChange={(e) => {
Expand Down Expand Up @@ -127,7 +127,7 @@ export const PoolSearch = ({
</div>
</TabsContent>
<TabsContent value="userPools" className="w-full text-center">
<div className="flex w-full flex-col gap-3 sm:flex-row sm:items-center">
<div className="flex w-full gap-y-3 gap-x-6 sm:items-center">
<SearchInput
value={search}
onChange={(e) => {
Expand Down
21 changes: 15 additions & 6 deletions apps/hub/src/app/pools/[poolId]/details/PoolCreateRewardVault.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import { Button } from "@bera/ui/button";
import { Card, CardContent } from "@bera/ui/card";
import { Separator } from "@bera/ui/separator";
import { Skeleton } from "@bera/ui/skeleton";
import Link from "next/link";
import { Address } from "viem";
import { useCreateRewardVault } from "~/app/vaults/create/components/useCreateRewardVault";

export const PoolCreateRewardVault = () => {
export const PoolCreateRewardVault = ({
address,
onSuccess,
}: {
address: Address;
onSuccess?: () => void;
}) => {
const { createRewardVault, ModalPortal } = useCreateRewardVault({
tokenAddress: address,
onSuccess,
});
return (
<Card>
{ModalPortal}
<CardContent className="p-4">
<div className="flex justify-between gap-2 items-center w-full">
<div>
Expand All @@ -21,8 +31,7 @@ export const PoolCreateRewardVault = () => {
<Button
variant="outline"
size="md"
as={Link}
href="/vaults/create/"
onClick={() => createRewardVault()}
>
Create
</Button>
Expand Down
Loading
Loading