-
Notifications
You must be signed in to change notification settings - Fork 0
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
cf93289
commit 276a59c
Showing
18 changed files
with
533 additions
and
63 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
interface IProps | ||
extends React.DetailedHTMLProps< | ||
React.ButtonHTMLAttributes<HTMLButtonElement>, | ||
HTMLButtonElement | ||
> { | ||
icon?: React.ReactNode | ||
title: string | ||
|
||
color: string | ||
textColor: string | ||
} | ||
|
||
export default function Button(props: IProps) { | ||
return ( | ||
<button | ||
className="inline-flex items-center gap-2.5 rounded-full px-7 py-4 shadow-[0_0_6px_0_rgba(0,0,0,0.08)]" | ||
style={{ | ||
backgroundColor: props.color, | ||
}} | ||
{...props} | ||
> | ||
{props.icon} | ||
|
||
<span | ||
className="font-bold leading-6 md:text-lg" | ||
style={{ | ||
color: props.textColor, | ||
}} | ||
> | ||
{props.title} | ||
</span> | ||
</button> | ||
) | ||
} |
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 { useLocation } from '@remix-run/react' | ||
import { FC, useEffect } from 'react' | ||
|
||
import * as ChannelService from '@channel.io/channel-web-sdk-loader' | ||
|
||
const ChannelIO: FC = () => { | ||
const location = useLocation() | ||
|
||
useEffect(() => { | ||
ChannelService.loadScript() | ||
ChannelService.boot({ | ||
pluginKey: 'c97bc164-c44c-40d2-a557-d960bb2fecf6', | ||
}) | ||
}, []) | ||
|
||
// https://developers.channel.io/reference/web-faq-kr#spa-환경에서-서포트봇과-마케팅-기능을-활용하고-싶어요 | ||
useEffect(() => { | ||
window.ChannelIO('setPage', location.pathname) | ||
window.ChannelIO('track', 'PageView') | ||
}, [location.pathname]) | ||
|
||
return null | ||
} | ||
|
||
export default ChannelIO |
Oops, something went wrong.