File tree Expand file tree Collapse file tree 3 files changed +38
-31
lines changed
npm-packages/dashboard/src Expand file tree Collapse file tree 3 files changed +38
-31
lines changed Original file line number Diff line number Diff line change 1+ import { useWindowSize } from "react-use" ;
2+ import { useEffect , useState } from "react" ;
3+ import FlourishTop from "./images/flourish-top.svg" ;
4+ import FlourishBottom from "./images/flourish-bottom.svg" ;
5+ import FlourishBottomRight from "./images/flourish-bottom-right.svg" ;
6+ import FlourishRight from "./images/flourish-right.svg" ;
7+ import FlourishLeft from "./images/flourish-left.svg" ;
8+
9+ export function Flourish ( ) {
10+ const [ mounted , setMounted ] = useState ( false ) ;
11+ useEffect ( ( ) => {
12+ setMounted ( true ) ;
13+ } , [ ] ) ;
14+
15+ const { height } = useWindowSize ( ) ;
16+
17+ return mounted && height > 500 ? (
18+ < div className = "hidden md:block dark:hidden" >
19+ < div className = "absolute top-0 left-1/2 -translate-x-1/2 translate-y-[-20%]" >
20+ < FlourishTop />
21+ </ div >
22+ < div className = "absolute bottom-0 left-1/2 -translate-x-1/2" >
23+ < FlourishBottom />
24+ </ div >
25+ < div className = "absolute right-0 bottom-[35%]" >
26+ < FlourishRight />
27+ </ div >
28+ < div className = "absolute bottom-[20%] left-0 -translate-y-1/2" >
29+ < FlourishLeft />
30+ </ div >
31+ < div className = "absolute right-[8%] bottom-0" >
32+ < FlourishBottomRight />
33+ </ div >
34+ </ div >
35+ ) : null ;
36+ }
Original file line number Diff line number Diff line change 11import React , { ReactNode } from "react" ;
22import { ConvexLogo } from "@common/elements/ConvexLogo" ;
33import { GoogleAnalytics } from "elements/GoogleAnalytics" ;
4-
5- import FlourishTop from "components/login/images/flourish-top.svg" ;
6- import FlourishBottom from "components/login/images/flourish-bottom.svg" ;
7- import FlourishBottomRight from "components/login/images/flourish-bottom-right.svg" ;
8- import FlourishRight from "components/login/images/flourish-right.svg" ;
9- import FlourishLeft from "components/login/images/flourish-left.svg" ;
10- import { useWindowSize } from "react-use" ;
4+ import { Flourish } from "components/login/Flourish" ;
115
126type LayoutProps = {
137 children : ReactNode ;
@@ -31,26 +25,3 @@ export function LoginLayout({ children }: LayoutProps) {
3125 </ div >
3226 ) ;
3327}
34-
35- export function Flourish ( ) {
36- const { height } = useWindowSize ( ) ;
37- return height > 500 ? (
38- < div className = "hidden md:block dark:hidden" >
39- < div className = "absolute top-0 left-1/2 -translate-x-1/2 translate-y-[-20%]" >
40- < FlourishTop />
41- </ div >
42- < div className = "absolute bottom-0 left-1/2 -translate-x-1/2" >
43- < FlourishBottom />
44- </ div >
45- < div className = "absolute right-0 bottom-[35%]" >
46- < FlourishRight />
47- </ div >
48- < div className = "absolute bottom-[20%] left-0 -translate-y-1/2" >
49- < FlourishLeft />
50- </ div >
51- < div className = "absolute right-[8%] bottom-0" >
52- < FlourishBottomRight />
53- </ div >
54- </ div >
55- ) : null ;
56- }
Original file line number Diff line number Diff line change 11import { GetServerSideProps } from "next" ;
2- import { Flourish } from "layouts/LoginLayout" ;
32import Head from "next/head" ;
43import { useParams , usePathname } from "next/navigation" ;
54import Background from "components/login/images/background.svg" ;
65import { ConvexLogo } from "@common/elements/ConvexLogo" ;
76import { RedeemReferralLanding } from "components/referral/RedeemReferralLanding" ;
87import { getSession } from "server/workos" ;
8+ import { Flourish } from "components/login/Flourish" ;
99
1010/**
1111 * This page powers two routes via Next.js rewrites in next.config.js:
You can’t perform that action at this time.
0 commit comments