Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Philipye314/imp 2 qr code scanner #3

Merged
merged 63 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
498625c
no progress
philipye314 Sep 28, 2023
abd51a9
wip
philipye314 Sep 28, 2023
93e502f
made no progress
philipye314 Sep 28, 2023
b044d9a
wip
philipye314 Oct 1, 2023
51218dc
??????
philipye314 Oct 1, 2023
1126b65
made no progress
philipye314 Sep 28, 2023
009b5c0
no progress
philipye314 Sep 28, 2023
42cb962
wip
philipye314 Sep 28, 2023
88d49a7
made no progress
philipye314 Sep 28, 2023
431f744
wip
philipye314 Oct 1, 2023
58a5b4b
??????
philipye314 Oct 1, 2023
9fd1e6e
wip
philipye314 Sep 28, 2023
0217228
made no progress
philipye314 Sep 28, 2023
243119f
fixed dependencies?
philipye314 Oct 5, 2023
1eaa208
fixing package issues
philipye314 Oct 5, 2023
8f58980
HELPPP
philipye314 Oct 6, 2023
db747ee
did branch
philipye314 Oct 8, 2023
26bb1be
Folasade/imp 5 supabase client (#6)
foloye Oct 11, 2023
8448bde
fix import
stephaniewong2 Oct 11, 2023
772194b
pull request changes fixed
philipye314 Oct 11, 2023
ef5453c
fixed some changes
philipye314 Oct 12, 2023
d21dcfe
no progress
philipye314 Sep 28, 2023
cc3fc42
weird
philipye314 Oct 12, 2023
e6c59bd
made no progress
philipye314 Sep 28, 2023
55abf19
wip
philipye314 Oct 1, 2023
7ed9c09
??????
philipye314 Oct 1, 2023
5067eac
made no progress
philipye314 Sep 28, 2023
4696a9b
no progress
philipye314 Sep 28, 2023
fab2e6b
wip
philipye314 Sep 28, 2023
b7690be
made no progress
philipye314 Sep 28, 2023
12ec543
wip
philipye314 Oct 1, 2023
111a1f4
??????
philipye314 Oct 1, 2023
093d80e
wip
philipye314 Sep 28, 2023
557818c
made no progress
philipye314 Sep 28, 2023
18629c3
fixed dependencies?
philipye314 Oct 5, 2023
48954c7
bruh
philipye314 Oct 12, 2023
ca77498
broo
philipye314 Oct 12, 2023
ef918a8
did branch
philipye314 Oct 8, 2023
e153bde
pull request changes fixed
philipye314 Oct 11, 2023
552fab9
fixed some changes
philipye314 Oct 12, 2023
aa4b77f
whaaat
philipye314 Oct 12, 2023
4c73ab0
no progress
philipye314 Sep 28, 2023
99b50d1
1/?
philipye314 Oct 13, 2023
d78fef9
made no progress
philipye314 Sep 28, 2023
83d6637
wip
philipye314 Oct 1, 2023
164ffea
??????
philipye314 Oct 1, 2023
25d6b74
made no progress
philipye314 Sep 28, 2023
e4d76c5
no progress
philipye314 Sep 28, 2023
507c473
wip
philipye314 Sep 28, 2023
819ac01
made no progress
philipye314 Sep 28, 2023
6144c59
wip
philipye314 Oct 1, 2023
58d3e3d
??????
philipye314 Oct 1, 2023
a716e09
wip
philipye314 Sep 28, 2023
152d01a
made no progress
philipye314 Sep 28, 2023
c7261d2
fixed dependencies?
philipye314 Oct 5, 2023
bfce92e
AHHHH
philipye314 Oct 13, 2023
80ae71e
brauhheheheh
philipye314 Oct 13, 2023
b84837b
bruhhahaha
philipye314 Oct 13, 2023
72db58f
pull request changes fixed
philipye314 Oct 11, 2023
efc88c6
fixed some changes
philipye314 Oct 12, 2023
c94cd78
fixing
philipye314 Oct 13, 2023
7382b39
package fix hopefully
philipye314 Oct 13, 2023
c8832f4
installed autofill
philipye314 Oct 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": ["expo-router"],
"plugins": [
"expo-router",
[
"expo-barcode-scanner",
{
"cameraPermission": "Allow $(PRODUCT_NAME) to access camera."
}
]
],
"scheme": "your-app-scheme"
}
}
7 changes: 0 additions & 7 deletions babel.config.js

This file was deleted.

61 changes: 61 additions & 0 deletions lib/DummyQueries.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { Text, TouchableOpacity, View } from 'react-native';
import styles from '../src/app/styles';
import supabase from './supabase';

export default function DummyQueries() {
let queryHolder;

async function allCases() {
const { data, error } = await supabase.from('Cases').select();
queryHolder = data;
queryHolder = error;
}
async function approvedCases() {
const { data, error } = await supabase
.from('Cases')
.select()
.filter('approved', 'is', 'True');
queryHolder = data;
queryHolder = error;
}
async function unapprovedCases() {
const { data, error } = await supabase
.from('Cases')
.select()
.filter('approved', 'is', 'False');
queryHolder = data;
queryHolder = error;
}
async function addCase() {
const dummyCase = {
approved: false,
title: 'Dummy Case',
summary: 'Testing intializing db',
image: 'no.jpg',
case_status: 'In Progress',
claim_link: 'berkeley.edu',
case_site: 'berkeley.edu',
opt_out_link: 'berkeley.edu',
};
const { error } = await supabase.from('Cases').insert(dummyCase);
queryHolder = error;
}

return (
<View>
<TouchableOpacity style={styles.button} onPress={() => allCases()}>
<Text>Get All Cases</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button} onPress={() => approvedCases()}>
<Text>Get Approved Cases</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button} onPress={() => unapprovedCases()}>
<Text>Get Unapproved Cases</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button} onPress={() => addCase()}>
<Text>Add a Dummy Case</Text>
</TouchableOpacity>
<Text>{queryHolder ? '' : queryHolder}</Text>
</View>
);
}
12 changes: 12 additions & 0 deletions lib/supabase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createClient } from '@supabase/supabase-js';
import 'react-native-url-polyfill/auto';

if (!process.env.SUPABASE_URL || !process.env.SUPABASE_ANON_KEY) {
throw new Error('Supabase environment variables are not defined.');
}
const supabase = createClient(
process.env.SUPABASE_URL,
process.env.SUPABASE_ANON_KEY,
);

export default supabase;
Loading