This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/packages/dashboard-v2/src/layouts/DashboardLayout.js

36 lines
883 B
JavaScript
Raw Normal View History

import * as React from "react";
import styled from "styled-components";
2022-02-28 15:39:50 +00:00
import { SWRConfig } from "swr";
import { authenticatedOnly } from "../lib/swrConfig";
import { PageContainer } from "../components/PageContainer";
import { NavBar } from "../components/Navbar";
import { Footer } from "../components/Footer";
const Layout = styled.div.attrs({
className: "min-h-screen overflow-hidden",
})`
background-image: url(/images/dashboard-bg.svg);
background-position: center -280px;
background-repeat: no-repeat;
`;
const DashboardLayout = ({ children }) => {
return (
<>
2022-02-28 15:39:50 +00:00
<SWRConfig value={authenticatedOnly}>
<Layout>
<NavBar />
<PageContainer>
<main className="mt-14">{children}</main>
</PageContainer>
<Footer />
</Layout>
</SWRConfig>
</>
);
};
export default DashboardLayout;