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 const todoKeys = { | |
| all: ['todos'] as const, | |
| lists: () => [...todoKeys.all, 'list'] as const, | |
| list: (filters: string) => [...todoKeys.lists(), { filters }] as const, | |
| details: () => [...todoKeys.all, 'detail'] as const, | |
| detail: (id: number) => [...todoKeys.details(), id] as const, | |
| } | 
  
    
      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 { InfiniteData, useMutation, useQueryClient } from 'react-query'; | |
| import { ExtendPayload } from '../globals'; | |
| import { useAuthStore } from '../store'; | |
| import { MessageListItem, MessageListResponse } from './useMessageList'; | |
| import { httpClient, stringifyQuery } from './utils'; | |
| interface CreateMessageBody { | |
| to: string; | |
| message: string; | 
  
    
      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 { onCleanup } from 'solid-js' | |
| import { createStore, reconcile, Store } from 'solid-js/store' | |
| import create, { SetState, State, StoreApi } from 'zustand/vanilla' | |
| interface CounterStore { | |
| count: number | |
| increment: () => void | |
| decrement: () => void | |
| } | 
  
    
      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 { createContext, createEffect, createSignal, useContext } from 'solid-js' | |
| const themeName = 'theme' | |
| const html = document.querySelector('html') | |
| function getInitialTheme() { | |
| const isDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches | |
| const storageTheme = localStorage.getItem(themeName) | |
| if (storageTheme) return storageTheme | 
  
    
      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 { writable } from 'svelte/store' | |
| const html = document.querySelector('html') | |
| const storedTheme = localStorage.getItem('theme') | |
| function isSystemThemeDark() { | |
| return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches | |
| } | |
| function createThemeStore() { | 
  
    
      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
    
  
  
    
  | <template> | |
| <button @click="ping">Ping</button> | |
| </template> | |
| <script setup> | |
| import useUnmountSignal from './useUnmountSignal'; | |
| const unmountSignal = useUnmountSignal(); | |
| const ping = () => { | 
  
    
      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
    
  
  
    
  | <template> | |
| <button @click="ping">Ping</button> | |
| </template> | |
| <script setup> | |
| import useCancelToken from './useCancelToken'; | |
| import axios from 'axios' | |
| const cancelToken = useCancelToken(); | 
  
    
      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 { View } from 'react-native'; | |
| import { WebView } from 'react-native-webview'; | |
| const INJECTED_JAVASCRIPT = `(function() { | |
| const tokenLocalStorage = window.localStorage.getItem('token'); | |
| window.ReactNativeWebView.postMessage(tokenLocalStorage); | |
| })();`; | |
| export default function App() { | |
| const onMessage = (payload) => { | 
  
    
      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 { useSWRInfinite } from 'swr'; | |
| const fetcher = (url) => fetch(url).then((res) => res.json()); | |
| const baseUrl = 'https://www.reddit.com'; | |
| export const useRedditPosts = (subreddit, sort = 'hot') => { | |
| if (!subreddit) { | |
| throw new Error('Subreddit is required'); | |
| } | 
  
    
      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
    
  
  
    
  | [{ | |
| "id": 1, | |
| "name": { | |
| "english": "Bulbasaur", | |
| "japanese": "フシギダネ", | |
| "chinese": "妙蛙种子", | |
| "french": "Bulbizarre" | |
| }, | |
| "type": [ | |
| "Grass", |