Skip to content

Commit

Permalink
Prisma?
Browse files Browse the repository at this point in the history
  • Loading branch information
koredefashokun committed Dec 1, 2024
1 parent 97a9286 commit 7433298
Show file tree
Hide file tree
Showing 4 changed files with 2,180 additions and 75 deletions.
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@apollo/server": "^4.10.4",
"@graphql-tools/schema": "^10.0.0",
"@prisma/client": "^5.13.0",
"@prisma/client": "^6.0.0",
"@sentry/cli": "^2.31.0",
"@sentry/node": "^7.109.0",
"@sentry/profiling-node": "^7.109.0",
Expand Down Expand Up @@ -45,7 +45,7 @@
"@types/lodash": "^4.14.198",
"@types/nodemailer": "^6.4.15",
"nodemon": "^3.1.7",
"prisma": "^5.13.0",
"prisma": "^6.0.0",
"ts-node": "^10.9.2",
"tsx": "^4.11.0",
"typescript": "^5.3.3"
Expand Down
2 changes: 1 addition & 1 deletion api/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextSearchPostgres"]
previewFeatures = ["fullTextSearch"]
}

datasource db {
Expand Down
17 changes: 10 additions & 7 deletions apps/app/src/screens/Profile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Screen, Separator, Spacer } from '@habiti/components';
import { NavigationProp, useNavigation } from '@react-navigation/native';
import React from 'react';
import { View } from 'react-native';
import { Alert, View } from 'react-native';

import ProfileRow from '../components/profile/ProfileRow';
import UserCard from '../components/profile/UserCard';
Expand All @@ -27,9 +27,12 @@ const Profile: React.FC = () => {
const logOut = useStore(state => state.logOut);
const { navigate } = useNavigation<NavigationProp<ProfileStackParamList>>();

const noop = React.useCallback(() => {
// Something
}, []);
const confirmLogOut = React.useCallback(() => {
Alert.alert('Log Out', 'Are you sure you want to log out?', [
{ text: 'Cancel', style: 'cancel' },
{ text: 'Log Out', style: 'destructive', onPress: logOut }
]);
}, [logOut]);

return (
<Screen>
Expand Down Expand Up @@ -61,12 +64,12 @@ const Profile: React.FC = () => {
<Spacer y={8} />
<Separator style={{ marginHorizontal: 16 }} />
<Spacer y={8} />
<ProfileRow title='About this app' onPress={noop} />
<ProfileRow title='Support' onPress={noop} />
<ProfileRow title='About this app' onPress={() => {}} />
<ProfileRow title='Support' onPress={() => {}} />
</View>
<Spacer y={24} />
<View style={{ paddingHorizontal: 16 }}>
<Button text='Log Out' onPress={logOut} />
<Button text='Log Out' onPress={confirmLogOut} />
</View>
</Screen>
);
Expand Down
Loading

0 comments on commit 7433298

Please sign in to comment.