File tree Expand file tree Collapse file tree 4 files changed +61
-1
lines changed Expand file tree Collapse file tree 4 files changed +61
-1
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ import Courses from "@/components/courses";
6
6
import Finder from "@/components/internship-finder" ;
7
7
import Features from "@/components/features" ;
8
8
import Approach from "@/components/approach" ;
9
+ import Popup from "@/components/popup" ;
9
10
import { Box } from "@chakra-ui/react" ;
10
11
11
12
export default function Home ( ) {
12
13
13
14
return (
14
15
< Box my = { [ "20px" , "130px" ] } px = { 5 } >
16
+ < Popup />
15
17
< HeroHeader />
16
18
< Courses />
17
19
< Features />
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ function Form({ questions = [], role = "" }) {
63
63
if ( response . ok ) {
64
64
toast ( {
65
65
title : 'Congrats!' ,
66
- description : 'We have received your application. We will reach out to you soon!' ,
66
+ description : 'We have received your application. We will reach out to you soon! ' ,
67
67
status : 'success' ,
68
68
duration : 5000 ,
69
69
isClosable : true ,
Original file line number Diff line number Diff line change
1
+ import {
2
+ Box ,
3
+ Button ,
4
+ Image ,
5
+ Modal ,
6
+ ModalOverlay ,
7
+ ModalContent ,
8
+ ModalHeader ,
9
+ ModalCloseButton ,
10
+ Text ,
11
+ ModalBody ,
12
+ ModalFooter ,
13
+ useDisclosure ,
14
+ } from "@chakra-ui/react" ;
15
+ import React , { useEffect , useState } from "react" ;
16
+
17
+ function Popup ( ) {
18
+ const { isOpen, onOpen, onClose } = useDisclosure ( ) ;
19
+ const [ isFirstTime , setIsFirstTime ] = useState ( false ) ;
20
+
21
+ useEffect ( ( ) => {
22
+ if ( typeof window !== "undefined" ) {
23
+ const seenPopup = localStorage . getItem ( "seenPopup" ) ;
24
+ if ( ! seenPopup || seenPopup === "false" ) {
25
+ setIsFirstTime ( true ) ;
26
+ onOpen ( ) ;
27
+ localStorage . setItem ( "seenPopup" , "true" ) ;
28
+ }
29
+ }
30
+ } , [ onOpen ] ) ;
31
+
32
+ return (
33
+ < Modal isOpen = { isFirstTime && isOpen } onClose = { onClose } >
34
+ < ModalOverlay />
35
+ < ModalContent >
36
+ < ModalHeader color = "blackAlpha.900" > Check Out Our Dashboard</ ModalHeader >
37
+
38
+ < ModalCloseButton color = "black" />
39
+ < ModalBody >
40
+ < Text color = "blackAlpha.900" >
41
+ We have a learning platform where you can learn about various technologies and increase your knowledge for free.
42
+ </ Text >
43
+ < Image src = "/sneakpeak.svg" alt = "Dashboard Image" />
44
+ </ ModalBody >
45
+
46
+ < Button colorScheme = "blue" my = { 4 } mx = { 8 } as = "a" href = "https://dashboard.techoptimum.org" >
47
+ Check out 15+ coding courses
48
+ </ Button >
49
+
50
+
51
+ </ ModalContent >
52
+ </ Modal >
53
+ ) ;
54
+ }
55
+
56
+ export default Popup ;
57
+
You can’t perform that action at this time.
0 commit comments