Skip to content

Commit 0a67ea5

Browse files
committed
Rename to 'front' for consistency
1 parent b728c8d commit 0a67ea5

8 files changed

Lines changed: 26 additions & 27 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
An npm module that allows you to mitigate the negative performance and user
99
experience impact of chat tools. `react-live-chat-loader` shows a fake widget
10-
until the page has become idle or users are ready to interact with chat. Currently works with [Intercom](#intercom), [Help Scout](#help-scout), [Drift](#drift), [Messenger](#messenger), [Userlike](#userlike), [Front](#frontChat) and [Chatwoot](#chatwoot).
10+
until the page has become idle or users are ready to interact with chat. Currently works with [Intercom](#intercom), [Help Scout](#help-scout), [Drift](#drift), [Messenger](#messenger), [Userlike](#userlike), [Front](#front) and [Chatwoot](#chatwoot).
1111

1212
Made by the team at [♠ Calibre](https://calibreapp.com/), your performance companion.
1313

@@ -122,7 +122,7 @@ export const LoadChatButton = () => {
122122

123123
You can pass the following props to the `LiveChatLoaderProvider` provider:
124124

125-
- `provider`: Choose from `helpScout`, `intercom`, `drift`, `frontChat` or `messenger` ([see below](#-supported-providers))
125+
- `provider`: Choose from `helpScout`, `intercom`, `drift`, `front` or `messenger` ([see below](#-supported-providers))
126126
- `providerKey`: Provider API Key ([see below](#-supported-providers))
127127
- `idlePeriod`: How long to wait in ms before loading the provider. Default is
128128
`2000`. Set to `0` to never load. This value is used in a `setTimeout` in
@@ -348,30 +348,30 @@ You can customise the Chatwoot placeholder by passing the following props to the
348348
</details>
349349

350350
<details>
351-
<summary id="frontChat">FrontChat</summary>
351+
<summary id="front">Front</summary>
352352

353-
To use FrontChat import the `LiveChatLoaderProvider` and set the `provider` prop
354-
as `frontChat` and the `providerKey` prop as your FrontChat `chatId`.
353+
To use Front import the `LiveChatLoaderProvider` and set the `provider` prop
354+
as `front` and the `providerKey` prop as your Front Chat `chatId`.
355355

356-
Then import the `FrontChat` component.
356+
Then import the `Front` component.
357357

358358
```jsx
359-
import { LiveChatLoaderProvider, FrontChat } from 'react-live-chat-loader'
359+
import { LiveChatLoaderProvider, Front } from 'react-live-chat-loader'
360360

361361
export default () => {
362362
return (
363363
<LiveChatLoaderProvider
364-
providerKey="YourFrontChat-chatId"
365-
provider="frontChat"
364+
providerKey="your-front-chat-chatId"
365+
provider="front"
366366
>
367367
/* ... */
368-
<FrontChat />
368+
<Front />
369369
</LiveChatLoaderProvider>
370370
)
371371
}
372372
```
373373

374-
You can customise the FrontChat placeholder icon by passing the following props to the `FrontChat` component:
374+
You can customise the Front placeholder icon by passing the following props to the `Front` component:
375375

376376
- `color`: The background color of the placeholder widget.
377377
- `containerClass`: Class to be added to the placeholder element, defaults to `live-chat-loader-placeholder`
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const styles: {
1010
} = {
1111
wrapper: {
1212
position: 'fixed',
13-
// z-index is 1 more than FrontChat's actual launcher as when the real widget loads
14-
// it might not initially reflect the fake icon's current state (open/closed)
13+
// z-index is 1 more than Front's actual launcher as when the real widget loads
1514
zIndex: 100000000,
1615
bottom: '20px',
1716
right: '20px',
@@ -47,7 +46,7 @@ interface Props extends ProviderProps {
4746
color?: string
4847
}
4948

50-
const FrontChat = ({
49+
const Front = ({
5150
color = '#333333',
5251
containerClass = ClassNames.container
5352
}: Props) => {
@@ -115,4 +114,4 @@ const FrontChat = ({
115114
)
116115
}
117116

118-
export default FrontChat
117+
export default Front

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export { default as Intercom } from './components/Intercom'
66
export { default as Messenger } from './components/Messenger'
77
export { default as Userlike } from './components/Userlike'
88
export { default as Chatwoot } from './components/Chatwoot'
9-
export { default as FrontChat } from './components/FrontChat'
9+
export { default as Front } from './components/Front'
1010
export { default as LiveChatLoaderProvider } from './components/LiveChatLoaderProvider'

src/providers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ export { default as intercom } from './intercom'
44
export { default as messenger } from './messenger'
55
export { default as userlike } from './userlike'
66
export { default as chatwoot } from './chatwoot'
7-
export { default as frontChat } from './frontChat'
7+
export { default as front } from './front'

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export type Provider =
1414
| 'drift'
1515
| 'userlike'
1616
| 'chatwoot'
17-
| 'frontChat'
17+
| 'front'

website/components/exampleLinks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const ExampleLinks = () => (
3434
</Link>
3535
</li>
3636
<li>
37-
<Link href="/frontchat">
38-
<a>FrontChat</a>
37+
<Link href="/front">
38+
<a>Front</a>
3939
</Link>
4040
</li>
4141
</ul>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import React from 'react'
2-
import { LiveChatLoaderProvider, FrontChat } from 'react-live-chat-loader'
2+
import { LiveChatLoaderProvider, Front } from 'react-live-chat-loader'
33
import type { NextPage } from 'next'
44

55
import Layout from '../layouts/main'
66
import ExampleLinks from '../components/exampleLinks'
77

88
const Page: NextPage = () => (
99
<LiveChatLoaderProvider
10-
provider="frontChat"
11-
providerKey="68cdc08b45c2d546d827398bb8d0d857"
10+
provider="front"
11+
providerKey="b2b8dcd0c63c934d363e6704cfa6af86"
1212
>
13-
<Layout title="React Live Chat Loader: FrontChat">
13+
<Layout title="React Live Chat Loader: Front">
1414
<div className="wrapper">
1515
<div className="inner">
16-
<h1>React Live Chat Loader: FrontChat</h1>
16+
<h1>React Live Chat Loader: Front</h1>
1717
<p>
18-
This is an example implementation of the FrontChat chat widget using{' '}
18+
This is an example implementation of the Front chat widget using{' '}
1919
<a href="https://github.com/calibreapp/react-live-chat-loader">
2020
react-live-chat-loader
2121
</a>
@@ -25,7 +25,7 @@ const Page: NextPage = () => (
2525
<ExampleLinks />
2626
</div>
2727
</div>
28-
<FrontChat color="#333333" />
28+
<Front color="#333333" />
2929
</Layout>
3030
</LiveChatLoaderProvider>
3131
)

0 commit comments

Comments
 (0)