Skip to content
Snippets Groups Projects
Commit 6a30f124 authored by Ganapathi Subramanyam  Jayam's avatar Ganapathi Subramanyam Jayam :dart:
Browse files

Merge branch 'master' into 'fileinsert'

# Conflicts:
#   digital-course-file/src/user/FolderNav.js
parents 60d45e20 061db731
No related branches found
No related tags found
1 merge request!41Fileinsert #38
......@@ -20,6 +20,7 @@
"react-google-button": "^0.7.2",
"react-icons": "^4.2.0",
"react-loader-spinner": "^4.0.0",
"react-router-bootstrap": "^0.25.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.2",
"web-vitals": "^1.1.0"
......
digital-course-file/public/favicon.ico

3.78 KiB | W: 64px | H: 64px

digital-course-file/public/favicon.ico

7.23 KiB | W: 48px | H: 48px

digital-course-file/public/favicon.ico
digital-course-file/public/favicon.ico
digital-course-file/public/favicon.ico
digital-course-file/public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -10,8 +10,8 @@ import copyright from './user/copyright'
import { Link } from 'react-router-dom'
import { Container, Button, Navbar, Nav } from 'react-bootstrap'
import fire from './fire'
import ForgotPassword from "./user/ForgotPassword"
import ForgotPassword from './user/ForgotPassword'
import { LinkContainer } from 'react-router-bootstrap'
const Routes = () => {
const [user, setUser] = useState('')
......@@ -39,26 +39,31 @@ const Routes = () => {
<h2>Course File System</h2>
</Navbar.Brand>
{user && (
<Link to="/signin">
<button className='logoutbutton' onClick={()=>fire.auth().signOut()}>
<Link to='/signin'>
<button
className='logoutbutton'
onClick={() => fire.auth().signOut()}
>
Logout
</button></Link>
</button>
</Link>
)}
</nav>
</section>
<Switch>
{/*Folders*/}
<Route path='/folder/:folderId' component={Hero} />
<Route path='/folder/:folderId' exact component={Hero} />
<Route path='/' exact component={Signin} />
<Route path='/signin' exact component={Signin} />
<Route path='/copyright' exact component={copyright} />
<Route path='/copyright' component={copyright} />
<Route path='/folder/copyright' component={copyright} />
<Route path='/forgot-password' component={ForgotPassword} />
</Switch>
<Navbar fixed='bottom' variant='light' bg='light'>
<Container className='ml-sm-2'>
<Nav.Link eventKey={2} href='copyright'>
&copy; Digital Course File Group 2
</Nav.Link>
<LinkContainer to='/copyright'>
<Nav.Link>&copy; Digital Course File Group 2</Nav.Link>
</LinkContainer>
</Container>
</Navbar>
</BrowserRouter>
......
import { react } from "react";
import { Breadcrumb } from "react-bootstrap";
import { Link } from "react-router-dom";
import { ROOT_FOLDER } from "../hooks/useFolder";
import { react } from 'react'
import { Breadcrumb } from 'react-bootstrap'
import { Link } from 'react-router-dom'
import { ROOT_FOLDER } from '../hooks/useFolder'
export default function FolderNav({ currentFolder }) {
let path = currentFolder === ROOT_FOLDER ? [] : [ROOT_FOLDER]
if (currentFolder) {
path = [...path,...currentFolder.path];
path = [...path, ...currentFolder.path]
}
return (
<Breadcrumb
className="flex-grow-1"
listProps = {{ className : "bg-white pl-0 m-0"}}
className='flex-grow-1'
listProps={{ className: 'bg-white pl-0 m-0' }}
>
{path.map((folder, index) => (
<Breadcrumb.Item
key={folder.id}
linkAs={Link}
linkProps={{
to : folder.id ? `/folder/${folder.id}` : "/",
to: folder.id ? `/folder/${folder.id}` : '/',
}}
className="text-truncate d-inline-block"
style = { {maxWidth : "175px"} }
className='text-truncate d-inline-block'
style={{ maxWidth: '175px' }}
>
{folder.name}
</Breadcrumb.Item>
))}
{currentFolder && (
<Breadcrumb.Item
className="text-truncate d-inline-block"
style = { {maxWidth : "200px"} }
className='text-truncate d-inline-block'
style={{ maxWidth: '200px' }}
active
>
{currentFolder.name}
</Breadcrumb.Item>
)
}
)}
</Breadcrumb>
);
)
}
\ No newline at end of file
......@@ -37,6 +37,7 @@ const Hero = ({ handleLogout }) => {
)
}
if(folder.id!=="copyright"){
return (
<>
<Container fluid>
......@@ -94,6 +95,12 @@ const Hero = ({ handleLogout }) => {
</Navbar>
</>
)
}else{
return null
}
}
class ContextMenu extends React.Component {
state = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment