Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🍎🪐 ↣ [STA-13 HDASH-5] Attempting to fix inheritance issues with layouts #40

Open
wants to merge 1 commit into
base: sta-1-basic-dashboard-index-format
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified client/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion client/.eslintcache

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import { Switch, Route, BrowserRouter as Router } from "react-router-dom";
import { Switch, Route, BrowserRouter as Router, BrowserRouter } from "react-router-dom";
import { UserContext } from "./lib/UserContext";
import { LifetimeContext } from "./lib/LifetimeContext";
import { LifetimeAccessRequestStatusContext } from "./lib/LifetimeAccessRequestStatusContext";
Expand All @@ -15,6 +15,7 @@ import PaymentForm from "./components/payment-form";
import Layout from "./components/layout";

import Dashboard from "./pages/Dashboard";
import dbLayout from "./components/db-layout";

// Import Magic-related things
import { magic } from "./lib/magic";
Expand Down Expand Up @@ -51,6 +52,7 @@ function App() {
}, []);

return (

<Router>
<Switch>
<UserContext.Provider value={[user, setUser]}>
Expand Down Expand Up @@ -81,6 +83,8 @@ function App() {
}}
/>
</Layout>
<div>
</div>
</LifetimeAccessRequestStatusContext.Provider>
</LifetimeContext.Provider>
</UserContext.Provider>
Expand Down
Binary file modified client/src/components/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions client/src/components/Home.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Header from "./header";

const Home = () => {
return (
<>

<h3 className="h3-header">Welcome to the Star Sailors DAO.</h3>
<div>Read up on development news</div>
<div>Connect with the team and fellow Star Sailors</div>
Expand Down
13 changes: 13 additions & 0 deletions client/src/components/db-layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Header from "./header";
import Dashboard from "../pages/Dashboard";

const dbLayout = ({}) => (
<>
<Header />
<main>
<Dashboard />
</main>
</>
);

export default dbLayout;
2 changes: 2 additions & 0 deletions client/src/components/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useContext } from "react";
import { useHistory } from "react-router-dom";
import { UserContext } from "../lib/UserContext";
import Loading from "./loading";
import Header from "./header";

const Profile = () => {
const history = useHistory();
Expand All @@ -19,6 +20,7 @@ const Profile = () => {
) : (
user?.issuer && (
<>
<Header />
<div className="label">Email</div>
<div className="profile-info">{user.email}</div>

Expand Down