-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from CodyGarciaa/assignment1
Finished Assignment 1
- Loading branch information
Showing
6 changed files
with
246 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ yarn-error.* | |
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# typescript | ||
*.tsbuildinfo |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,92 @@ | ||
import { Text, View } from 'react-native'; | ||
// import { useState } from 'react'; | ||
import { Image, Text, View } from 'react-native'; | ||
import HeartIcon from '../../assets/heart-icon.svg'; | ||
import ShareIcon from '../../assets/messenger-icon.svg'; | ||
import ProfilePlaceholder from '../../assets/profile-placeholder-icon.svg'; | ||
// import supabase from '../../supabase/client'; | ||
import { styles } from './styles'; | ||
|
||
export default function PostScreen() { | ||
// const [postData, setPostData] = useState({ | ||
// description: 'description', | ||
// username: 'username', | ||
// imageURL: 'imageURL', | ||
// likes: 0, | ||
// }); | ||
|
||
// const { data, error } = await supabase.from('posts').select(); | ||
|
||
// await supabase.from('posts').select() | ||
// .then(data => ...) | ||
// .catch(error => ...); | ||
|
||
const comments = [ | ||
{ | ||
username: 'daviddd', | ||
date: 'September 20', | ||
text: 'This organization is doing amazing work tackling the complex root causes of the issue.', | ||
}, | ||
{ | ||
username: 'vppraggie', | ||
date: 'September 21', | ||
text: 'Thanks for sharing!', | ||
}, | ||
]; | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<ProfilePlaceholder /> | ||
<Text>rbeggs</Text> | ||
<Text>September 19</Text> | ||
<Text> | ||
In response to the growing homelessness crisis in San Francisco, a local | ||
nonprofit organization, Code Tenderloin, has launched a comprehensive | ||
initiative aimed at providing long-term solutions for individuals | ||
experiencing homelessness. The organization, founded in 2015, is | ||
dedicated to addressing both immediate needs and underlying causes of | ||
homelessness through a combination of shelter services, job training | ||
programs, and mental health support. read more online: | ||
https://www.codetenderloin.org/ | ||
</Text> | ||
<Text> | ||
Image URL: | ||
'https://cdn.britannica.com/51/178051-050-3B786A55/San-Francisco.jpg' | ||
</Text> | ||
<HeartIcon /> | ||
<Text>256 Likes</Text> | ||
<ShareIcon /> | ||
<ProfilePlaceholder /> | ||
<Text>philip_ye</Text> | ||
<Text>September 20</Text> | ||
<Text> | ||
This organization is doing amazing work tackling the complex root causes | ||
of the issue. | ||
</Text> | ||
<ProfilePlaceholder /> | ||
<Text>vppraggie</Text> | ||
<Text>September 21</Text> | ||
<Text>Thanks for sharing!</Text> | ||
<View style={styles.post}> | ||
<View style={styles.personHeader}> | ||
<View style={styles.nameProfile}> | ||
<ProfilePlaceholder /> | ||
<Text style={styles.username}>rbeggs</Text> | ||
</View> | ||
<View style={styles.dateDiv}> | ||
<Text style={styles.postDate}>September 19</Text> | ||
</View> | ||
</View> | ||
<Text style={styles.caption}> | ||
In response to the growing homelessness crisis in San Francisco, a | ||
local nonprofit organization, Code Tenderloin, has launched a | ||
comprehensive initiative aimed at providing long-term solutions for | ||
individuals experiencing homelessness. The organization, founded in | ||
2015, is dedicated to addressing both immediate needs and underlying | ||
causes of homelessness through a combination of shelter services, job | ||
training programs, and mental health support. read more online: | ||
<Text style={styles.link}>https://www.codetenderloin.org/</Text> | ||
</Text> | ||
<Image | ||
style={styles.postImage} | ||
source={{ | ||
uri: 'https://cdn.britannica.com/51/178051-050-3B786A55/San-Francisco.jpg', | ||
}} | ||
alt="image attached to post: photo of San Francisco" | ||
/> | ||
<View style={styles.interactions}> | ||
<View style={styles.likes}> | ||
<HeartIcon /> | ||
<Text style={styles.username}>256 Likes</Text> | ||
</View> | ||
<ShareIcon /> | ||
</View> | ||
</View> | ||
|
||
<View style={styles.comments}> | ||
{comments.map(comment => ( | ||
<View> | ||
<View style={styles.personHeader}> | ||
<View style={styles.nameProfile}> | ||
<ProfilePlaceholder /> | ||
<Text style={styles.username}>{comment['username']}</Text> | ||
</View> | ||
<View style={styles.dateDiv}> | ||
<Text style={styles.postDate}>{comment['date']}</Text> | ||
</View> | ||
</View> | ||
<Text style={styles.commentText}>{comment['text']}</Text> | ||
</View> | ||
))} | ||
</View> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { createClient } from '@supabase/supabase-js'; | ||
|
||
const supabase = createClient( | ||
process.env.PUBLIC_SUPABASE_URL!, | ||
process.env.PUBLIC_SUPABASE_ANON_KEY!, | ||
); | ||
export default supabase; |