@2dine/promos
v1.3.1
Published
2dine module for promos, coupons, ads & news
Downloads
46
Readme
promos
2dine module for promos, coupons, ads & news
Install
yarn add @2dine/promos
Usage
import React from 'react'
import {
BrowserRouter as Router,
Switch,
Route,
useHistory
} from 'react-router-dom'
import { Slider, PromoProvider } from 'promos'
import awsConfig from './aws-exports'
const Home = () => {
const history = useHistory()
return <Slider restaurantID={'restaurantID'} history={history} />
}
const App = () => {
return (
<Router>
<PromoProvider
awsConfig={awsConfig}
options={{
cdn: 'https://xxxxxxxxxxxx.cloudfront.net'
}}
>
<Switch>
<Route path='/'>
<Home />
</Route>
</Switch>
</PromoProvider>
</Router>
)
}
export default App
License
MIT © 2dine