-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5382aeb
commit a74f606
Showing
31 changed files
with
457 additions
and
499 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/components/Common/Modal/CloseIconInModalWithVitaminCake.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { PropsWithChildren } from 'react'; | ||
import { ModalProps } from '.'; | ||
import Image from 'next/image'; | ||
import { ColorsTypes } from '@/styles/styles'; | ||
import { VitaminCakeImg } from '../../../../public/assets/images'; | ||
import CloseIconInModal from './CloseIconInModal'; | ||
|
||
export default function CloseIconInModalWithVitaminCake({ | ||
modalColor = 'main_blue', | ||
modalTitle, | ||
children, | ||
...rest | ||
}: { modalColor?: keyof ColorsTypes; modalTitle: string } & PropsWithChildren & ModalProps) { | ||
return ( | ||
<CloseIconInModal {...rest}> | ||
<div className="flex flex-col items-center gap-20 w-full"> | ||
<div className="flex flex-col items-center w-full"> | ||
<Image src={VitaminCakeImg} alt="케이크 이미지" width={60} height={60} /> | ||
<h4 className="font-bitbit text-[24px] text-background">{modalTitle}</h4> | ||
</div> | ||
{children} | ||
</div> | ||
</CloseIconInModal> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import Image from 'next/image'; | ||
import InputText from '../Input/inputText'; | ||
import CloseIconInModal from './CloseIconInModal'; | ||
import { LinkCopyIc } from '../../../../public/assets/icons'; | ||
import { snsShareListArray } from '@/constant/model/snsShareList'; | ||
import { useEffect } from 'react'; | ||
|
||
export default function ShareLinkModal({ | ||
modalState, | ||
handleModalState, | ||
wishId, | ||
nickName, | ||
}: { | ||
modalState: boolean; | ||
handleModalState: () => void; | ||
wishId: string; | ||
nickName: string; | ||
}) { | ||
const wishLink = `sunmulzu.com/wishes/${wishId}`; | ||
|
||
useEffect(() => { | ||
if (typeof window !== 'undefined') { | ||
const { Kakao } = window; | ||
|
||
if (!Kakao.isInitialized()) { | ||
Kakao.init(process.env.NEXT_PUBLIC_KAKAO_JAVASCRIPT_KEY); | ||
} | ||
} | ||
}, []); | ||
|
||
async function handleAccountWishesLink() { | ||
try { | ||
await navigator.clipboard.writeText(wishLink); | ||
alert('링크가 복사됐어요!'); | ||
} catch (error) {} | ||
} | ||
|
||
return ( | ||
<CloseIconInModal isOpen={modalState} handleState={handleModalState}> | ||
<div className="flex gap-10 justify-center w-full p-10"> | ||
{snsShareListArray.map((snsItem) => ( | ||
<Image | ||
src={snsItem.image} | ||
alt="sns아이콘" | ||
onClick={() => { | ||
snsItem.onClick(wishLink, nickName); | ||
}} | ||
/> | ||
))} | ||
</div> | ||
|
||
<InputText onClick={handleAccountWishesLink} value={wishLink} readOnly> | ||
<Image src={LinkCopyIc} alt="" onClick={handleAccountWishesLink} /> | ||
</InputText> | ||
</CloseIconInModal> | ||
); | ||
} |
Oops, something went wrong.