@snapdragonsnursery/react-components 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapdragonsnursery/react-components",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -104,14 +104,8 @@ const ChildSearchModal = ({
104
104
  setError(null);
105
105
 
106
106
  try {
107
- // Get access token
108
- const apiBaseUrl = import.meta.env.VITE_COMMON_API_BASE_URL || "https://snaps-common-api.azurewebsites.net";
109
- const apiScope = apiBaseUrl.replace(/^https?:\/\//, "api://") + "/.default";
110
-
111
- const response = await instance.acquireTokenSilent({
112
- scopes: [apiScope],
113
- account: accounts[0],
114
- });
107
+ // Get function key for authentication
108
+ const functionKey = import.meta.env.VITE_COMMON_API_FUNCTION_KEY || "";
115
109
 
116
110
  // Build query parameters
117
111
  const params = new URLSearchParams({
@@ -167,8 +161,8 @@ const ChildSearchModal = ({
167
161
  }/api/search-children?${params}`,
168
162
  {
169
163
  headers: {
170
- Authorization: `Bearer ${response.accessToken}`,
171
164
  "Content-Type": "application/json",
165
+ "x-functions-key": functionKey,
172
166
  },
173
167
  }
174
168
  );
@@ -320,10 +314,10 @@ const ChildSearchModal = ({
320
314
  if (!isOpen) return null;
321
315
 
322
316
  return (
323
- <div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
317
+ <div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4 overflow-hidden">
324
318
  <div
325
319
  ref={modalRef}
326
- className={`bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col ${className}`}
320
+ className={`bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-4xl w-full h-[90vh] flex flex-col ${className}`}
327
321
  >
328
322
  {/* Header */}
329
323
  <div className="flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700">
@@ -429,7 +423,7 @@ const ChildSearchModal = ({
429
423
 
430
424
  {/* Advanced Filters */}
431
425
  {isAdvancedFiltersOpen && (
432
- <div className="mt-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg">
426
+ <div className="mt-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg max-h-64 overflow-y-auto">
433
427
  <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
434
428
  {/* Status Filter */}
435
429
  <div>
@@ -636,7 +630,7 @@ const ChildSearchModal = ({
636
630
  )}
637
631
 
638
632
  {!loading && !error && (
639
- <div className="overflow-y-auto max-h-96">
633
+ <div className="overflow-y-auto h-full">
640
634
  {children.length === 0 ? (
641
635
  <div className="p-6 text-center text-gray-500 dark:text-gray-400">
642
636
  {debouncedSearchTerm