File tree Expand file tree Collapse file tree 2 files changed +22
-16
lines changed
widgets/globalFloatingWidget/ui Expand file tree Collapse file tree 2 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 1- import { Button } from '@/components/ui/button' ;
2-
31import GoogleForm from './../../../../public/icons/google-form.png' ;
42import Image from 'next/image' ;
53export const GoogleFormBtn = ( ) => {
64 return (
7- < >
8- < Button
9- onClick = { ( ) =>
10- window . open (
11- 'https://docs.google.com/forms/d/e/1FAIpQLSfRoquj0yyevkgalFsJwKl4UcvZ3FRhuRyK1j8edJLS7S4aFw/viewform?usp=header'
12- )
13- }
14- className = "bg-[#214d35] hover:bg-[#276e48] text-white rounded-full w-14 h-14 p-0 shadow-lg hover:shadow-xl transition-all duration-200"
15- >
16- < Image src = { GoogleForm } alt = "google-form" width = { 24 } height = { 24 } />
17- </ Button >
18- </ >
5+ < div
6+ onClick = { ( ) =>
7+ window . open (
8+ 'https://docs.google.com/forms/d/e/1FAIpQLSfRoquj0yyevkgalFsJwKl4UcvZ3FRhuRyK1j8edJLS7S4aFw/viewform?usp=header'
9+ )
10+ }
11+ className = "bg-primary flex justify-center items-center hover:bg-hover-primary rounded-full w-14 h-14 p-0 shadow-lg hover:shadow-xl transition-all duration-200"
12+ >
13+ < Image src = { GoogleForm } alt = "google-form" width = { 24 } height = { 24 } />
14+ </ div >
1915 ) ;
2016} ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { usePathname } from 'next/navigation';
77import Cookies from 'js-cookie' ;
88import { useEffect , useState } from 'react' ;
99import { GoogleFormBtn } from '@/features/google-form/ui/GoogleFormButton' ;
10+ import { Tooltip , TooltipContent , TooltipTrigger } from '@/components/ui/tooltip' ;
1011export function GlobalFloatingWidget ( ) {
1112 const problemId = usePathname ( ) . split ( '/' ) [ 2 ] ;
1213 const [ isLogged , setIsLogged ] = useState ( false ) ;
@@ -22,13 +23,22 @@ export function GlobalFloatingWidget() {
2223
2324 if ( problemId ) return null ;
2425
26+ const tooltipContent = '오류 사항, 제안 사항을 구글폼에 남겨주세요!' ;
2527 return (
26- < div className = "fixed top -[calc(100vh-15 %)] left-[calc(100vw-5%)] flex flex-col gap-2" >
28+ < div className = "fixed bottom -[calc(100vh-95 %)] left-[calc(100vw-5%)] flex flex-col gap-2" >
2729 { isLogged && < ChatDialogOpenButton /> }
2830 { isLogged && (
2931 < GameModalButton hasCharacter = { characterData ?. data ?. result ?. isCharacterExist || false } />
3032 ) }
31- < GoogleFormBtn />
33+
34+ < Tooltip >
35+ < TooltipTrigger >
36+ < GoogleFormBtn />
37+ </ TooltipTrigger >
38+ < TooltipContent >
39+ < p > { tooltipContent } </ p >
40+ </ TooltipContent >
41+ </ Tooltip >
3242 </ div >
3343 ) ;
3444}
You can’t perform that action at this time.
0 commit comments