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 url(https://fonts.googleapis.com/css?family=Open+Sans:400,700); | |
* { | |
box-sizing: border-box; | |
} | |
body { | |
font-family: 'Open Sans', Arial, Helvetica, sans-serif; | |
background-color: white; | |
margin: 0; |
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 { StyleSheet } from "react-native"; | |
type ThemeConfigKey = "colors" | "space" | "fontSizes"; | |
type ThemeConfigEntry = Record<string, unknown>; | |
type ThemeConfig = Record<ThemeConfigKey, ThemeConfigEntry>; | |
type FlattenedThemeEntry = { | |
token: keyof ThemeConfig[ThemeConfigKey]; | |
property: ThemeConfigKey; | |
value: unknown; | |
}; |
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 { createApi, fetchBaseQuery } from '@rtk-incubator/rtk-query'; | |
export const api = createApi({ | |
reducerPath: 'api', | |
baseQuery: fetchBaseQuery({ | |
baseUrl: process.env.REACT_APP_API_URL, | |
prepareHeaders(headers) { | |
const token = localStorage.getItem('accessToken'); | |
if (token) { |
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 SearchContext = createContext({}); | |
const SearchProvider = ({children}) => { | |
const [artistsData, setArtistsData] = useState([]); | |
const [searchTerm, setSearchTerm] = useState([]); | |
async function fetchArtistsData() { | |
// ..pega dados dos artistas | |
setArtistsData(data); |
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
class KeyState { | |
isPressed: boolean; | |
timeSinceChanged: number; | |
constructor(isPressed) { | |
this.isPressed = isPressed; | |
this.timeSinceChanged = 0; | |
} | |
} |