This repository has been archived by the owner on Jun 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into neto#pushNotificationsEnable/Disable
- Loading branch information
Showing
6 changed files
with
106 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* eslint-disable no-plusplus */ | ||
const getColor = () => { | ||
const hexadecimais = "0123456789ABCDEF" | ||
let cor = "#" | ||
while (1) { | ||
for (let i = 0; i < 6; i++) { | ||
cor += hexadecimais[Math.floor(Math.random() * 16)] | ||
} | ||
if (cor === "#FFFFFF") { | ||
cor = "#" | ||
} else { | ||
return cor | ||
} | ||
} | ||
} | ||
|
||
export default getColor |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import React from "react" | ||
|
||
import "~/config/ReactotronConfig" | ||
import firebase from "react-native-firebase" | ||
|
||
import Routes from "~/routes" | ||
import { createRootNavigator } from "~/routes" | ||
|
||
const App = () => <Routes /> | ||
const App = () => { | ||
let isAuth | ||
firebase.auth().onAuthStateChanged(user => { | ||
isAuth = user != null | ||
}) | ||
const Routes = createRootNavigator(isAuth) | ||
return <Routes /> | ||
} | ||
|
||
export default App |
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