rental request email to owner

This commit is contained in:
jackiettran
2025-10-15 15:19:23 -04:00
parent b9e6cfc54d
commit 407c69aa22
9 changed files with 658 additions and 56 deletions

View File

@@ -33,7 +33,7 @@ const ItemInformation: React.FC<ItemInformationProps> = ({
<div className="mb-3">
<label htmlFor="description" className="form-label">
Description *
Description
</label>
<textarea
className="form-control"
@@ -42,7 +42,6 @@ const ItemInformation: React.FC<ItemInformationProps> = ({
rows={4}
value={description}
onChange={onChange}
required
/>
</div>
</div>

View File

@@ -267,10 +267,6 @@ const RentItem: React.FC = () => {
</div>
) : totalCost === 0 ? (
<>
<div className="alert alert-success">
<i className="bi bi-check-circle me-2"></i>
This item is free to borrow! No payment required
</div>
<div className="d-grid gap-2">
<button
type="button"

View File

@@ -58,13 +58,9 @@ api.interceptors.request.use(async (config) => {
if (["POST", "PUT", "DELETE", "PATCH"].includes(method)) {
// If we don't have a CSRF token yet, try to fetch it
if (!csrfToken) {
// Skip fetching for most auth endpoints to avoid circular dependency
// Exception: /auth/google needs CSRF token and should auto-fetch as fallback
const isAuthEndpoint =
config.url?.includes("/auth/") &&
!config.url?.includes("/auth/refresh") &&
!config.url?.includes("/auth/google");
if (!isAuthEndpoint) {
// Skip fetching only for the CSRF token endpoint itself to avoid circular dependency
const isCsrfEndpoint = config.url?.includes("/auth/csrf-token");
if (!isCsrfEndpoint) {
await fetchCSRFToken();
}
}