Skip to content

Commit

Permalink
the two buttons lol
Browse files Browse the repository at this point in the history
  • Loading branch information
arfamomin committed Oct 9, 2024
1 parent 94b134e commit ac6e969
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/HealingResources/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
import React, { useEffect, useState } from 'react';
import { Button, View } from 'react-native';
import supabase from '../supabase/createClient';

interface Resource {
summary: string;
[key: string]: any;
}

export default function HealingResources() {
const [, setSummaries] = useState<Resource[]>([]);

useEffect(() => {
fetchData();
}, []);

const fetchData = async () => {
try {
const { data, error } = await supabase
.from('healing_resources')
.select('*');

if (error) {
console.error('Error fetching resources:', error);
return;
}

setSummaries(data as Resource[]);
} catch (error) {
console.error('Error fetching data:', error);
}
};

return (
<View>
<Button
Expand Down

0 comments on commit ac6e969

Please sign in to comment.