Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-palwar authored and rajdip-b committed Oct 30, 2024
1 parent f47211f commit 4660843
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
6 changes: 1 addition & 5 deletions apps/platform/src/app/(main)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<boolean>(false)
Expand Down Expand Up @@ -79,10 +79,6 @@ export default function Index(): JSX.Element {

return (
<div className="flex flex-col gap-4">
<div className="flex items-center justify-between">
{/* <h1 className="text-[1.75rem] font-semibold ">My Projects</h1> */}
</div>

{projects.length !== 0 ? (
<div className="grid h-[70vh] gap-6 overflow-y-auto scroll-smooth p-2 md:grid-cols-2 2xl:grid-cols-3">
{projects.map((project: ProjectWithoutKeys) => {
Expand Down
14 changes: 7 additions & 7 deletions apps/web/src/components/hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@ function Hero(): React.JSX.Element {

if (!result.success) {
toast.custom(() => (
<div className="text-brandBlue border-brandBlue/20 w-[90vw] rounded-lg border bg-errorRed p-2 shadow-2xl backdrop-blur-3xl md:w-[20vw]">
<div className="text-brandBlue border-brandBlue/20 bg-errorRed w-[90vw] rounded-lg border p-2 shadow-2xl backdrop-blur-3xl md:w-[20vw]">
<p className="text-sm">Please enter a valid email address </p>
</div>
))
return
}

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(() => (
<div className="text-brandBlue border-brandBlue/20 w-[90vw] rounded-lg border bg-errorRed p-2 shadow-2xl backdrop-blur-3xl md:w-[20vw]">
<div className="text-brandBlue border-brandBlue/20 bg-errorRed w-[90vw] rounded-lg border p-2 shadow-2xl backdrop-blur-3xl md:w-[20vw]">
<p className="text-sm">
You have been already added to the waitlist. We will notify you once
we launch.
Expand All @@ -60,13 +62,11 @@ function Hero(): React.JSX.Element {
launch
</p>
</div>

))
))

emailsInWaitlist.push(email)
localStorage.setItem('waitlistData', JSON.stringify(emailsInWaitlist))
setEmail('')

} catch (error) {
// eslint-disable-next-line no-console -- chill
console.error(error)
Expand Down

0 comments on commit 4660843

Please sign in to comment.