Skip to content

Instantly share code, notes, and snippets.

@balinux
Created November 17, 2021 02:29
Show Gist options
  • Save balinux/44d9af175630f45dcc3543eeffefada3 to your computer and use it in GitHub Desktop.
Save balinux/44d9af175630f45dcc3543eeffefada3 to your computer and use it in GitHub Desktop.
layout with react bootstrap
import React from "react";
import { Container, Nav, Navbar } from "react-bootstrap";
import { Link, Outlet } from "react-router-dom";
const Layout = ({ childen }) => {
return (
<>
<Navbar bg="primary" variant="dark">
<Container>
<Navbar.Brand href="#home">Sms Broadcast</Navbar.Brand>
<Nav className="me-auto">
<Nav.Link as={Link} to="/home" >Home</Nav.Link>
<Nav.Link as={Link} to="/upload-csv" >Tambah data</Nav.Link>
<Nav.Link as={Link} to="/send-message" >Kirim sms</Nav.Link>
</Nav>
</Container>
</Navbar>
<div className="content">
<Outlet />
</div>
</>
)
}
export default Layout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment