Teleport and Book an appointment
- React
- React Router Dom (V6)
- Tailwind
- Tailwind component library - DaisyUI
- Firebase
- React Day Picker
- React firebase hooks
- React hook form
- React toastify
- React query
- Stripe
In React, when you want to pass an interpreted expression, you have to open a pair of curly braces
<button className={'pill ${ this.props.styleName }'}>
(`` instead of '')
style={{ background: 'url(${appointment})' }}
(``instead of '')backgroundSize: "contain"
can be added if the background image is not displaying properly
use negative margin on the image
mt-[-150px]
(tailwind class)
mt-[-150px]
perfect alignment
lg:max-w-lg
same as @media (min-width: 1024px) { .lg\:max-w-lg { max-width: 32rem/* 512px */; } }
bg-gradient-to-r from-secondary to-primary
gradient color
gap-px
for 1px gap between grid elements
ctrl +
ctrl + shift + \
{slots.length ? (
// after booking slot will decrease so the as long as there is the first item, it will be displayed
<span>{slots[0]}</span>
) : (
<span>No slot available</span>
)}
if (true || gLoading || loading) {
return <Loading></Loading>;
}
-
had to use useEffect
-
hand to use
|| ""
-
do not enter div inside
tbody
tag