Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Alpha 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
edionay committed Aug 12, 2020
1 parent 43f6e10 commit 589f96c
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 44 deletions.
14 changes: 7 additions & 7 deletions .firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
asset-manifest.json,1587251523778,b27c3f3b13b72f30a285c2a879acaf34a51611b32c7252b0d9b0137bf85eb76a
background.css,1587134527830,2a2667af1465564abffbc29875cf9bb2e1b609fbbf7cc53eba3b886a22891b85
favicon.ico,1587134527830,d96ddbc4933b04e12c738ab39f469573143949ca2c39eda0a49d16f83d40c319
index.html,1587251523778,264721d153f47c78d69494e99d6993d2ca377b4f021d78fac9821112e1dfecd0
logo192.png,1587134527832,3ee59515172ee198f3be375979df15ac5345183e656720a381b8872b2a39dc8b
logo512.png,1587134527832,ee7e2f3fdb8209c4b6fd7bef6ba50d1b9dba30a25bb5c3126df057e1cb6f5331
manifest.json,1587134527833,5c997de1364b8be939319fa9209abd77f2caf7f8844999a9e2e9173f844e7840
precache-manifest.11f1ffe7f248917c571d005757cceb49.js,1587251523778,0262bce3a326a19be2faec34df989ad853c26bedbc39d01ca7041464e371aec1
robots.txt,1587134527833,b2090cf9761ef60aa06e4fab97679bd43dfa5e5df073701ead5879d7c68f1ec5
service-worker.js,1587251523778,5640c446183d75ff0a6b7016583469a90fc2b3b300a691588dfbd4207333d727
assets/header-background.png,1587134525979,bbf65ef72377a2b4ceda4361339bda4a0a3cd277fd937a2074d09cdcd1a44c8e
assets/main-background.png,1587134525980,fbf27e6d98f9f9b49e6d785d9b4b017316dc5cb6dd59c4d8dccf85d29427bc34
assets/covers/Agent K.K..png,1587134525881,36f6b5657fc6202b050fc485daffc6a47247926194045d26e1d87289498d408b
Expand Down Expand Up @@ -200,16 +204,12 @@ assets/songs/To the Edge.mp3,1587134527768,8ba431d5f32f704915a4a4a7cf062e7400fb1
assets/songs/Two Days Ago.mp3,1587134527793,6021d466a65e4525ae339bf0d2b534bd27b35dfab197000ae26e710a4168a70b
assets/songs/Wandering.mp3,1587134527803,cdece80d1b337413a0708e2d1cd86f219b5a09e3b206d35d1d019619d065affe
assets/songs/Welcome Horizons.mp3,1587134527829,ef71114daefe6992e0f0e419f9659b577875ebf8177ea2ebaf554ffef0e2e2c6
asset-manifest.json,1587251523778,b27c3f3b13b72f30a285c2a879acaf34a51611b32c7252b0d9b0137bf85eb76a
index.html,1587251523778,264721d153f47c78d69494e99d6993d2ca377b4f021d78fac9821112e1dfecd0
precache-manifest.11f1ffe7f248917c571d005757cceb49.js,1587251523778,0262bce3a326a19be2faec34df989ad853c26bedbc39d01ca7041464e371aec1
service-worker.js,1587251523778,5640c446183d75ff0a6b7016583469a90fc2b3b300a691588dfbd4207333d727
static/css/main.54041615.chunk.css,1587251523782,3cc6b4f5eabb9959a67634bebd146321c8116f4fad572041a168d5fca6a9e4bc
static/css/main.54041615.chunk.css.map,1587251523826,109915e3ca9a838a1033e3567166d8630efd19d4a8e8e4ee8514b94565140a1d
static/js/2.d72e76be.chunk.js,1587251523825,1c99f5632a0d35f74b9d4b07e21e63150609ecaccc2ca32855ca8e3c4f9cd207
static/js/2.d72e76be.chunk.js.LICENSE.txt,1587251523827,77ac658b6f9734da3b65f651972b0503706bdfdd40181a1d739bea12f0b69705
static/js/2.d72e76be.chunk.js.map,1587251523831,dc9952b786b9d20e966272eb26cdc0c4ce7c0c0a34682768056757e7be4a28a6
static/js/main.b8cf6b9e.chunk.js,1587251523791,eb43675d33857765c905364a42abe09481c1a2998f7d05a1ed0717b9dd2e5ecb
static/js/runtime-main.b3236dcd.js,1587251523827,0af3eea692ad8b2e02c0efdfc6b6d9fbc173f8c1335a023791df3d8f71b88f48
static/js/main.b8cf6b9e.chunk.js.map,1587251523827,6302f18d1bf654e1786aeca4749ff8911a5f751d3c4a466759731f916650d3f3
static/js/runtime-main.b3236dcd.js,1587251523827,0af3eea692ad8b2e02c0efdfc6b6d9fbc173f8c1335a023791df3d8f71b88f48
static/js/runtime-main.b3236dcd.js.map,1587251523827,6a71ac3a4a581d3a07c4486cdfe3310c1c728c051a089fe2e2018ffa4f1c385c
static/js/2.d72e76be.chunk.js,1587251523825,1c99f5632a0d35f74b9d4b07e21e63150609ecaccc2ca32855ca8e3c4f9cd207
static/js/2.d72e76be.chunk.js.map,1587251523831,dc9952b786b9d20e966272eb26cdc0c4ce7c0c0a34682768056757e7be4a28a6
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "./App.css";
function App() {
return (
<div>
{/* <Navbar /> */}
<Navbar />
<Routes />
</div>
);
Expand Down
18 changes: 9 additions & 9 deletions src/Auth.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import React, { useEffect, useState } from "react"
import app from "./base.js"
import React, { useEffect, useState } from "react";
import app from "./base.js";

export const AuthContext = React.createContext()
export const AuthContext = React.createContext();

export const AuthProvider = ({ children }) => {
const [currentUser, setCurrentUser] = useState(null)
const [currentUser, setCurrentUser] = useState(null);

useEffect(() => {
app.auth().onAuthStateChanged((user) => {
setCurrentUser(user)
})
}, [])
setCurrentUser(user);
});
}, []);

return (
<AuthContext.Provider value={{ currentUser }}>
{children}
</AuthContext.Provider>
)
}
);
};
12 changes: 6 additions & 6 deletions src/PrivateRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const PrivateRoute = ({ component: RouteComponent, ...rest }) => {
return (
<Route
{...rest}
render={(routeProps) =>
!!currentUser ? (
<RouteComponent {...routeProps} />
) : (
<Redirect to={"/login"} />
)
render={
(routeProps) =>
!!currentUser && <RouteComponent {...routeProps} />
// : (
// <Redirect to={"/login"} />
// )
}
/>
);
Expand Down
14 changes: 8 additions & 6 deletions src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import "firebase/auth"


const app = firebase.initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_KEY,
authDomain: process.env.REACT_APP_FIREBASE_DOMAIN,
databaseURL: process.env.REACT_APP_FIREBASE_DATABASE,
projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID,
storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.REACT_APP_FIREBASE_SENDER_ID
apiKey: "AIzaSyB-wdDhFB9po8vx_talwR1MaIM7wD8KzQs",
authDomain: "acnh-share.firebaseapp.com",
databaseURL: "https://acnh-share.firebaseio.com",
projectId: "acnh-share",
storageBucket: "acnh-share.appspot.com",
messagingSenderId: "42593365910",
appId: "1:42593365910:web:aaf1ed429ceef53aac37b7",
measurementId: "G-F1GV50HXRM"
})

export default app
23 changes: 23 additions & 0 deletions src/components/Navbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.topnav {
background-color: #333;
overflow: hidden;
}

.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}

.topnav a:hover {
background-color: #ddd;
color: black;
}

.topnav a.active {
background-color: #4caf50;
color: white;
}
27 changes: 13 additions & 14 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import React from "react"
import React from "react";
import "./Navbar.css";

const Navbar = () => (
<div
style={{
marginTop: "-10vh",
height: "40vh",
width: "100vw",
background: "url(./assets/header-background.png)",
backgroundRepeat: "repeat-x",
position: "fixed",
top: 0,
zIndex: 1,
}}></div>
)
<div class="topnav">
<a class="active" href="/">
Músicas
</a>
<a href="#">Amigos</a>
<a href="profile">Perfil</a>
<a href="#">Desejos</a>
<a href="#">Sair</a>
</div>
);

export default Navbar
export default Navbar;
2 changes: 1 addition & 1 deletion src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Routes() {
<div>
<PrivateRoute exact path="/" component={SongList} />
<Route exact path="/login" component={Login} />
<Route exact path="/profile" component={Profile} />
<PrivateRoute exact path="/profile" component={Profile} />
</div>
</BrowserRouter>
</AuthProvider>
Expand Down

0 comments on commit 589f96c

Please sign in to comment.