Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
import qs from 'qs'; | |
export const cmsURL = "cms URL without the / at the end"; | |
export const apiKey = "yourAPIkey"; | |
export async function getDocuments (collectionName: string, whereQuery?) { | |
if (whereQuery) { | |
const stringifiedQuery = qs.stringify({ | |
where: whereQuery | |
}, { addQueryPrefix: true }); |
Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />