mirror of
https://github.com/sasjs/server.git
synced 2026-04-10 07:33:13 +00:00
chore: rename Web folder to web
This commit is contained in:
49
web/src/components/header.tsx
Normal file
49
web/src/components/header.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import React, { useState } from 'react'
|
||||
import { Link, useHistory, useLocation } from 'react-router-dom'
|
||||
|
||||
import AppBar from '@mui/material/AppBar'
|
||||
import Toolbar from '@mui/material/Toolbar'
|
||||
import Tabs from '@mui/material/Tabs'
|
||||
import Tab from '@mui/material/Tab'
|
||||
|
||||
const Header = (props: any) => {
|
||||
const history = useHistory()
|
||||
const [tabValue, setTabValue] = useState(0)
|
||||
|
||||
const handleTabChange = (event: React.SyntheticEvent, value: number) => {
|
||||
setTabValue(value)
|
||||
}
|
||||
return (
|
||||
<AppBar
|
||||
position="fixed"
|
||||
sx={{ zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
||||
>
|
||||
<Toolbar variant="dense">
|
||||
<img
|
||||
src="logo-white.png"
|
||||
alt="logo"
|
||||
style={{
|
||||
width: '50px',
|
||||
cursor: 'pointer',
|
||||
marginRight: '25px'
|
||||
}}
|
||||
onClick={() => {
|
||||
setTabValue(0)
|
||||
history.push('/')
|
||||
}}
|
||||
/>
|
||||
<Tabs
|
||||
indicatorColor="secondary"
|
||||
value={tabValue}
|
||||
onChange={handleTabChange}
|
||||
>
|
||||
<Tab label="Home" to="/" component={Link} />
|
||||
<Tab label="SASjs Drive" to="/SASjsDrive" component={Link} />
|
||||
<Tab label="SAS Studio" to="/SASjsStudio" component={Link} />
|
||||
</Tabs>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
)
|
||||
}
|
||||
|
||||
export default Header
|
||||
15
web/src/components/home.tsx
Normal file
15
web/src/components/home.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import React from 'react'
|
||||
|
||||
import CssBaseline from '@mui/material/CssBaseline'
|
||||
import Box from '@mui/material/Box'
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
<Box sx={{ display: 'flex' }} className="main">
|
||||
<CssBaseline />
|
||||
<h2>this is home component</h2>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
export default Home
|
||||
Reference in New Issue
Block a user