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
const YEAR_IN_SEC = 31536000; | |
const MONTH_IN_SEC = 2628000; | |
const DAY_IN_SEC = 86400; | |
const HOUR_IN_SEC = 3600; | |
const MINUTES_IN_SEC = 60; | |
export function getTimeAgo(value: string, locale: string = "tr") { | |
const now = new Date().getTime(); | |
const entryTime = Date.parse(value); |
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
import { useEffect, useRef, useState } from "react"; | |
import { AdEventType, InterstitialAd } from "react-native-google-mobile-ads"; | |
import analytics from "@react-native-firebase/analytics"; | |
import adId from "@/utils/adId"; | |
import { useAuthStore } from "@/stores/authStore"; | |
import isPremium from "@/utils/isPremium"; | |
interface IUseInterstitialAd { | |
onAdLoaded?: (showAd: () => void) => void; | |
onAdWatched?: () => void; |
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
const defineConfig = (config) => { | |
const { withAndroidManifest } = require('@expo/config-plugins'); | |
config = withAndroidManifest(config, (config) => { | |
let androidManifest = config.modResults.manifest; | |
androidManifest.application = androidManifest.application || []; | |
androidManifest.application[0]["meta-data"].push({ | |
$: { | |
"android:name": | |
"com.dieam.reactnativepushnotification.notification_color", |
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
<?php | |
namespace App\Enums; | |
/** | |
* Class SubscriptionTypeEnums | |
* @package App\Enums | |
*/ | |
final class SubscriptionTypeEnums | |
{ |
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
import { Children } from "react"; | |
import type { ViewProps, ViewIfElseProps } from "./View.types"; | |
export default function View({ viewIf, div, children }: ViewProps) { | |
if (Children.count(children) > 2) | |
throw new Error( | |
"View component can only have 2 children, View.If and View.Else" | |
); | |
if (viewIf === true) return <>{Children.toArray(children)[0]}</>; |
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
Lorem ipsum dolor sit amet just kidding. Hope you doing well. |
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
import { isClient } from "@utils/isClient"; // check for Serverside rendering | |
interface DefaultSettingsTypes { | |
cookies: boolean; | |
installedVersion: string; | |
installedEnv: string; | |
navbarCollapsed: boolean; | |
} | |
const DefaultSettings: DefaultSettingsTypes = { |
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
interface BuildComponentTypes { | |
name?: string; | |
defaultClasses?: string; | |
extraClasses?: string; | |
conditionalClasses?: Array<{ | |
[key: string]: string | boolean | undefined; | |
}>; | |
selectedClasses?: Array<string | boolean | undefined>; | |
} |
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
import { | |
createContext, | |
PropsWithChildren, | |
ReactNode, | |
useContext, | |
useEffect, | |
useState, | |
} from "react"; | |
import { AnimateSharedLayout, motion } from "framer-motion"; |
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
/** | |
* BuildComponent function makes it easy to build classes for custom components. | |
* @param {string} name - Name of the component. | |
* @param {string} defaultClasses - Default classes for the component. | |
* @param {string} extraClasses - Extra classes for the component. | |
* @param {array} conditionalClasses - Array of objects, which is conditional classes for the component. | |
* @param {array} selectedClasses - Array of strings, which is selected classes for the component. | |
* @returns {object} data - Object with the following properties: | |
* @returns {string} data.name - Name of the component. | |
* @returns {string} data.classes - Classes for the component. |
NewerOlder