From f47211fd2ddcce5f5f967103e31bfe840f133aea Mon Sep 17 00:00:00 2001 From: dev-palwar Date: Tue, 29 Oct 2024 17:00:29 +0530 Subject: [PATCH 1/2] changed the empty page UI as per the figma design --- apps/platform/src/app/(main)/page.tsx | 166 ++++++++++++++------------ apps/platform/src/assets/Group 12.png | Bin 0 -> 3845 bytes 2 files changed, 89 insertions(+), 77 deletions(-) create mode 100644 apps/platform/src/assets/Group 12.png diff --git a/apps/platform/src/app/(main)/page.tsx b/apps/platform/src/app/(main)/page.tsx index 58539509..ba0bc360 100644 --- a/apps/platform/src/app/(main)/page.tsx +++ b/apps/platform/src/app/(main)/page.tsx @@ -2,7 +2,8 @@ import { useEffect, useState } from 'react' import { toast } from 'sonner' import { useRouter } from 'next/navigation' -import { AddSVG } from '@public/svg/shared' +import Image from 'next/image' +import fileIcon from '../../assets/Group 12.png' import ProjectCard from '@/components/dashboard/projectCard' import { Sheet, @@ -79,80 +80,7 @@ export default function Index(): JSX.Element { return (
-

My Projects

- - - - - - - Create a new project - - Fill in the details to create a new project - -
-
-
- - { - setNewProjectData((prev) => ({ - ...prev, - name: e.target.value - })) - }} - placeholder="Enter the name" - /> -
-
- - { - setNewProjectData((prev) => ({ - ...prev, - description: e.target.value - })) - }} - placeholder="Enter the name" - /> -
- {/* {isNameEmpty ? ( - - Name cannot be empty - - ) : null} */} -
-
-
- -
-
-
+ {/*

My Projects

*/}
{projects.length !== 0 ? ( @@ -173,8 +101,92 @@ export default function Index(): JSX.Element { })}
) : ( -
-
No projects yet? Get started by creating a new project.
+
+
+ +

+ Start your First Project +

+

+ Create a file and start setting up your environment and secret + keys +

+ + + + + + Create a new project + + Fill in the details to create a new project + +
+
+
+ + { + setNewProjectData((prev) => ({ + ...prev, + name: e.target.value + })) + }} + placeholder="Enter the name" + /> +
+
+ + { + setNewProjectData((prev) => ({ + ...prev, + description: e.target.value + })) + }} + placeholder="Enter the name" + /> +
+ {/* {isNameEmpty ? ( + + Name cannot be empty + + ) : null} */} +
+
+
+ +
+
+
+
)} diff --git a/apps/platform/src/assets/Group 12.png b/apps/platform/src/assets/Group 12.png new file mode 100644 index 0000000000000000000000000000000000000000..9a4bbbfc9781df6298e86e955584ef050740455b GIT binary patch literal 3845 zcmV+g5Bl(lP)#p{$ zMHi;CN(%(0U7$__H6F^c4cCTCHj$88rj&C=_YxE}9CA2ccka9oK#`IK$C3E*oOAEY zaEc%i4%^<|u9ixrrKzc@Du1cQw<T4}|%(wRR^mNm8 z-8Mn&rU)XDAauLkCH2IAkMEb{%QXB+pA-p*D>n|!?VX*S27(hE0us`(W5?>MDxBg^ zbr?+M@~z3CxyhkvZftBc2*!qhjPTZ5Z!ML}saI*DTHM}p##G6b(NnCUvMav zskosSM#6H9Uo@`ppzl&a6*3@FEqJcDzz^#L@1A<^A!kbmN{kmv-P^=9If{_jm%Bsylu`VD8MmB5>iZua2FpMCr*XsKE`bDyY z6#cB8IZ%*avA!ZK*P7}YSM>9FZoA5qQws|VvX8OK zw|5ClCBK{HN~J=bPUj}&Q0^*-+T@d};Sl7B%hlwQyj7DDM#2fOvC&L)k zV#&P0uOxpYv{XeTmq)QSXht~oDdF(%aZJ! zQ3?{@NtYdRzBB%?X2=(LqoOo++!GCmI(%e>01}`MOW}-kzM+I9Hl(X_$8Qio!n)n= zCrQ0sLm~meaxSE-&DG@nB$j_;4~SaMmGe0q0!U9H%fGR&V)5#N4CM|1q-#k%_hJ?6 zkS-@Y(cU@a0IA~&ax(6rJ+>B0%^lKO;lk07rC8^Y*jg+#lp`FFwW_+{M=WA#vD9YZ zSpqP_>vB0EZngeG5k+pXRBLsQ01Oky{z&8&OSM)2#!(kJkM?&^1Zb_ma8+)#rnuE= z(1a##vCvvUPDEPOnz+T{aHMj$F+fCB^)6%+nJ6Ih^YiBjtrg@)UEar%CNNQpRjbvc zwQ>j`KU~#ng*sL%bOlj^xkCW?;_U3~gg$XER0Y9d?2vOZupbXoMM6~&9H|RAR}EW5 z#;zb()&)z1sv=`okR*<^2gpFED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y#)ttJcKRkGCK!$)Xw@dW>WzD=-4FJ`Q*-L?H7PnWC5@t|)g z(+IP(v%liII$27d0J8im!~2gv{*PZ#q$e%Y%*+fGiOd%dAKv$Z(QN*m9zT90OP^#j zt{&%kln6YBLarKwg6z&LWWE=4qPi=}a=jB;?m@BoTC(^5)gG3 zqU>%WBoI|I&Ykj65?SUQMlJu!nTQSngqPTI?l7qaL?9$Eq13}6QV)ngNFbz4!XZ+b zK?bRfM9d^Gj%HTj5SdgEOmUmjFj2RISAv^8}3CK09TCLWXWC$Z#tbRO~)cFl1X?cZ7~4_}%0)mlykC3%NlTT+c^q-cRX_x)Np897-0=qG zNbUlnp_=4|_r8`Kj1|hE+y+FbYI2Dmo+U6*Bgrd{q#@S<(KsjPR5fu3Od##ldCo=T ztE*?tihyXU?UI8Y9fBKNuDDNHc5!UUwBTJ@6Ft4=VEhB|JlK?PIDfM}}y zTIOH=8A4SVRJdy4r_cfECnsugSk4uER%xqq!LJpuTKGXgd=xA!E{EbeLg5bq8G*wh zmn4$mUfM8uocHrmq+OE3&9C!)gF}I9lLbIPLXzsjcS{@?sV)*2hs@^EULbDDJ*q@F z2uMV7@jJd-;+Cw=Pr~ Date: Wed, 30 Oct 2024 12:55:47 +0530 Subject: [PATCH 2/2] removed comments --- apps/platform/src/app/(main)/page.tsx | 6 +----- apps/web/src/components/hero/index.tsx | 14 +++++++------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/apps/platform/src/app/(main)/page.tsx b/apps/platform/src/app/(main)/page.tsx index ba0bc360..e4ab3ac8 100644 --- a/apps/platform/src/app/(main)/page.tsx +++ b/apps/platform/src/app/(main)/page.tsx @@ -3,7 +3,6 @@ import { useEffect, useState } from 'react' import { toast } from 'sonner' import { useRouter } from 'next/navigation' import Image from 'next/image' -import fileIcon from '../../assets/Group 12.png' import ProjectCard from '@/components/dashboard/projectCard' import { Sheet, @@ -28,6 +27,7 @@ import { DialogTrigger } from '@/components/ui/dialog' import { Projects } from '@/lib/api-functions/projects' +import fileIcon from '../../assets/Group 12.png' export default function Index(): JSX.Element { const [isSheetOpen, setIsSheetOpen] = useState(false) @@ -79,10 +79,6 @@ export default function Index(): JSX.Element { return (
-
- {/*

My Projects

*/} -
- {projects.length !== 0 ? (
{projects.map((project: ProjectWithoutKeys) => { diff --git a/apps/web/src/components/hero/index.tsx b/apps/web/src/components/hero/index.tsx index 7fca0013..da553bea 100644 --- a/apps/web/src/components/hero/index.tsx +++ b/apps/web/src/components/hero/index.tsx @@ -20,7 +20,7 @@ function Hero(): React.JSX.Element { if (!result.success) { toast.custom(() => ( -
+

Please enter a valid email address

)) @@ -28,12 +28,14 @@ function Hero(): React.JSX.Element { } const dataInStorage: string | null = localStorage.getItem('waitlistData') - const emailsInWaitlist: string[] = dataInStorage ? (JSON.parse(dataInStorage) as string[]) : [] - + const emailsInWaitlist: string[] = dataInStorage + ? (JSON.parse(dataInStorage) as string[]) + : [] + // actual logic where we are checking if this email is already in waitlisted users or not if (emailsInWaitlist.includes(email)) { toast.custom(() => ( -
+

You have been already added to the waitlist. We will notify you once we launch. @@ -60,13 +62,11 @@ function Hero(): React.JSX.Element { launch

- - )) + )) emailsInWaitlist.push(email) localStorage.setItem('waitlistData', JSON.stringify(emailsInWaitlist)) setEmail('') - } catch (error) { // eslint-disable-next-line no-console -- chill console.error(error)