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
import * as SecureStore from "expo-secure-store"; | |
export const storeData = async (name: string, value: string): Promise<void> => { | |
try { | |
await SecureStore.setItemAsync(name, value); | |
} catch (err) { | |
console.log(err); | |
} | |
}; |
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
import { Case, Default, Switch } from "./ConditionalRender"; | |
<Switch> | |
<Case condition={item.orderStatus == 2}> | |
<Text style={[styles.ordersItemSuccesText, { color: "black" }]}> | |
Yeni Sipariş | |
</Text> | |
</Case> | |
<Case condition={item.orderStatus == 3}> | |
<Text style={[styles.ordersItemSuccesText, { color: "black" }]}> |
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
import { FontAwesome5 } from "@expo/vector-icons"; | |
import React, { useState, ReactNode } from "react"; | |
import { | |
Modal, | |
Text, | |
TouchableOpacity, | |
View, | |
StyleSheet, | |
} from "react-native"; | |
import * as Animatable from "react-native-animatable"; |
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
const { data, error, isLoading } = useFetch<FetchResult<object | any>>( | |
`https://jsonplaceholder.typicode.com/todos/1` | |
); | |
useEffect(() => { | |
console.log(data, error, isLoading); | |
}, [data, error, isLoading]); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>AlpineJS - Get data from api</title> | |
</head> | |
<body> | |
<h1>AlpineJS - Get data from api</h1> | |
<div x-data="app()" x-init="init()"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>AlpineJS Hello World</title> | |
</head> | |
<body> | |
<div x-data="app()"> | |
<button x-on:click="toggleMessage()" x-text="messageShow ? 'Hide': 'Show'"></button> |
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
$(document).ready(() => { | |
var post_content = $('#post') | |
$.ajax({ | |
type: "GET", | |
url: 'http://localhost:3000/post', | |
dataType: "json", | |
beforeSend: () => { | |
$("#loading").show(); | |
}, | |
success: (result) => { |