chat-widget
chat-widget copied to clipboard
Add option to hide widget outside working hours
Let's add a new prop: hideOutsideWorkingHours
.
If this is true
, we'll check the widget settings settings.account?.is_outside_working_hours
and completely hide the widget if this value is true
.
@reichert621, I like to work on this
sure @tharun208! let me know if you need any help getting set up :+1:
@reichert621, The test account added in the repo is removed I think so
@tharun208 the easiest way to test for you would probably be to do the following:
- sign up for a free papercups account at https://app.papercups.io/register
- get your account ID and update this account ID to match yours: https://github.com/papercups-io/chat-widget/blob/master/example/src/App.tsx#L6
- remove/comment out these two lines (so they point at our hosted app by default): https://github.com/papercups-io/chat-widget/blob/master/example/src/App.tsx#L73-L74
@reichert621, should we need to show the chat widget icon or we need to show nothing to the user if this prop is set ?
show nothing if this prop is set :+1: