Skip to content

Commit

Permalink
Added anon statement for waves
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed Dec 1, 2024
1 parent c00f253 commit 815ee88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/app/waves/_components/wave-promote-card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import i18next from "i18next";
import { Button } from "@ui/button";
import { LoginRequired } from "@/features/shared";

export function WavePromoteCard() {
return (
Expand All @@ -12,9 +13,11 @@ export function WavePromoteCard() {
<div className="relative flex flex-col gap-4">
<div className="font-semibold text-lg">{i18next.t("waves.promote.title")}</div>
<div className="text-sm mb-8">{i18next.t("waves.promote.subtitle")}</div>
<Button className="text-sm font-semibold" size="lg" appearance="white">
{i18next.t("waves.promote.button")}
</Button>
<LoginRequired>
<Button className="text-sm font-semibold" size="lg" appearance="white">
{i18next.t("waves.promote.button")}
</Button>
</LoginRequired>
</div>
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion src/app/waves/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ import { classNameObject } from "@ui/util";
import { useMount, useUnmount } from "react-use";
import { TopCommunitiesWidget } from "@/app/_components/top-communities-widget";
import { WaveFollowsCard, WavePromoteCard, WavesProfileCard } from "@/app/waves/_components";
import { useGlobalStore } from "@/core/global-store";

interface Props {
view: ReactNode;
}

export default function WavesLayout(props: PropsWithChildren<Props>) {
const activeUser = useGlobalStore((s) => s.activeUser);

const [scroll, setScroll] = useState(0);

const handleScroll = useCallback(() => setScroll(window.scrollY), []);
Expand All @@ -31,7 +34,7 @@ export default function WavesLayout(props: PropsWithChildren<Props>) {
<Navbar experimental={true} />
<div className="pt-[156px] max-w-[1600px] px-4 md:px-6 lg:px-8 mx-auto grid grid-cols-12 gap-4 md:gap-6 xl:gap-8">
<div className="col-span-3 flex flex-col gap-4 md:gap-6 xl:gap-8">
<WavesProfileCard />
{activeUser && <WavesProfileCard />}
<WavePromoteCard />
</div>
<div className="col-span-6">{props.children}</div>
Expand Down

0 comments on commit 815ee88

Please sign in to comment.