This file contains hidden or 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
| export function useRenderCount(componentId: string) { | |
| const renderCount = useRef(1); | |
| console.log(`${componentId} renders ${renderCount.current++}`); | |
| return renderCount; | |
| } |
This file contains hidden or 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
| export function useImageUpload() { | |
| const [image, setImage] = useState<any>(null); | |
| async function openLibrary() { | |
| ImagePicker.openPicker({ | |
| width: 300, | |
| height: 400, | |
| cropping: true, | |
| includeBase64: false, | |
| }) | |
| .then(image => { |
This file contains hidden or 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
| export function useDateTimePicker() { | |
| const [date, setDate] = useState(new Date()) | |
| const [open, setOpen] = useState(false) | |
| const parsedDate = formatDate(date,false) | |
| function updateDT(obj: any) { | |
| if(obj.type === "open"){ | |
| setOpen(true) | |
| } | |
| if(obj.type === "dismissed"){ |
This file contains hidden or 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
| from locust import HttpUser, task | |
| import json | |
| token = 'TOKEN HERE' | |
| class LoadTestApi(HttpUser): | |
| # @task | |
| #def getUserById(self): | |
| # self.client.get( | |
| # url="api/v1/user/get_user_by_id", |
This file contains hidden or 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
| export default function Spinner(props) { | |
| return ( | |
| <svg | |
| className="text-gray-500" | |
| viewBox="0 0 2400 2400" | |
| width={24} | |
| height={24} | |
| {...props} | |
| > | |
| <g |
NewerOlder