+ )}
+ {/* Placeholder for a details link/modal trigger */}
+ {/*
+ View Details
+ */}
+
+ ))}
+
+ )}
);
}
diff --git a/myfavstuff/lib/supabaseClient.js b/myfavstuff/lib/supabaseClient.js
new file mode 100644
index 0000000..acec01e
--- /dev/null
+++ b/myfavstuff/lib/supabaseClient.js
@@ -0,0 +1,23 @@
+import { createClient } from '@supabase/supabase-js';
+
+const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
+const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
+
+if (!supabaseUrl) {
+ console.error('Error: Missing Supabase URL. Please set NEXT_PUBLIC_SUPABASE_URL in .env.local');
+}
+
+if (!supabaseAnonKey) {
+ console.error('Error: Missing Supabase Anon Key. Please set NEXT_PUBLIC_SUPABASE_ANON_KEY in .env.local');
+}
+
+// Ensure client is only created if keys are present, to avoid errors during build or in environments where keys might not be set.
+// The actual fetch operations in components should handle cases where supabase might not be initialized.
+let supabaseInstance = null;
+if (supabaseUrl && supabaseAnonKey) {
+ supabaseInstance = createClient(supabaseUrl, supabaseAnonKey);
+} else {
+ console.warn('Supabase client not initialized due to missing URL or Anon Key. App will run without Supabase functionality.');
+}
+
+export const supabase = supabaseInstance;