-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refacto with tanstack and mercure
- Loading branch information
Showing
25 changed files
with
510 additions
and
353 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
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
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,29 @@ | ||
import { Modal, Pressable, Text, View } from "react-native"; | ||
|
||
export default function ConfirmModal(props: { isVisible: boolean, onDecline: Function, onAccept: Function }) { | ||
const { isVisible, onDecline, onAccept } = props; | ||
|
||
return ( | ||
<Modal | ||
visible={isVisible} | ||
transparent | ||
animationType="fade" | ||
> | ||
<View className="flex flex-column items-center justify-center" style={containerStyle} > | ||
<View className="flex flex-column items-center border rounded py-4 px-12 bg-cyan-800"> | ||
<Text className="text-white text-1xl font-bold">Are you sure ?</Text> | ||
<View className="flex flex-row mt-5 gap-3 justify-center"> | ||
<Pressable onPress={() => onAccept()}> | ||
<Text className="bg-green-500 cursor-pointer text-white text-sm font-bold py-2 px-4 rounded">Yes</Text> | ||
</Pressable> | ||
<Pressable onPress={() => onDecline()}> | ||
<Text className="bg-red-500 cursor-pointer text-white text-sm font-bold py-2 px-4 rounded">Cancel</Text> | ||
</Pressable> | ||
</View> | ||
</View> | ||
</View > | ||
</Modal> | ||
) | ||
} | ||
|
||
const containerStyle = { height: '100%', width: '100%' } |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {{{ucf}}} from "@/lib/types/{{{ucf}}}"; | ||
import { Log, addNotificationFunction, clearNotificationsFunction } from "@/lib/utils/Logs"; | ||
import { createContext } from "react"; | ||
|
||
export type {{{ucf}}}ContextData = { | ||
notifications: Log[]; | ||
addNotification: addNotificationFunction, | ||
clearNotifications: clearNotificationsFunction, | ||
isModalVisible: boolean; | ||
isModalEdit: boolean; | ||
setIsModalVisible: (visible: boolean) => void; | ||
currentData?: {{{ucf}}}; | ||
} | ||
|
||
export const {{{ucf}}}Context = createContext<{{{ucf}}}ContextData>(null); |
Oops, something went wrong.