Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
e99a9640
Commit
e99a9640
authored
Aug 09, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
profile1
parent
f5525d3e
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
221 deletions
+138
-221
Index.js
src/Utils/Index.js
+48
-18
Profile.js
src/container/Profile.js
+67
-185
homeRoutes.js
src/router/homeRoutes.js
+23
-18
No files found.
src/Utils/Index.js
View file @
e99a9640
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
Menu
from
'@material-ui/core/Menu'
;
import
Menu
from
'@material-ui/core/Menu'
;
import
MenuItem
from
'@material-ui/core/MenuItem'
;
import
MenuItem
from
'@material-ui/core/MenuItem'
;
import
{
makeStyles
}
from
'@material-ui/core/styles'
;
import
{
makeStyles
}
from
'@material-ui/core/styles'
;
...
@@ -6,6 +6,7 @@ import Fade from '@material-ui/core/Fade';
...
@@ -6,6 +6,7 @@ import Fade from '@material-ui/core/Fade';
import
Grid
from
'@material-ui/core/Grid'
;
import
Grid
from
'@material-ui/core/Grid'
;
import
{
Typography
,
Avatar
}
from
'@material-ui/core'
;
import
{
Typography
,
Avatar
}
from
'@material-ui/core'
;
import
Images
from
'../assets/Images'
;
import
Images
from
'../assets/Images'
;
import
{
Link
,
useRouteMatch
}
from
'react-router-dom'
;
const
useStyles
=
makeStyles
({
const
useStyles
=
makeStyles
({
avatar
:
{
avatar
:
{
...
@@ -32,6 +33,8 @@ function FadeMenu() {
...
@@ -32,6 +33,8 @@ function FadeMenu() {
const
classes
=
useStyles
();
const
classes
=
useStyles
();
let
{
path
,
url
}
=
useRouteMatch
();
return
(
return
(
<
div
>
<
div
>
<
Grid
container
justify
=
"center"
alignItems
=
"center"
>
<
Grid
container
justify
=
"center"
alignItems
=
"center"
>
...
@@ -58,8 +61,10 @@ function FadeMenu() {
...
@@ -58,8 +61,10 @@ function FadeMenu() {
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
onClick
=
{
handleClose
}
>
<
MenuItem
onClick
=
{
handleClose
}
>
<
div
style
=
{{
display
:
'flex'
,
padding
:
10
}}
>
<
div
style
=
{{
display
:
'flex'
,
padding
:
10
}}
>
<
Link
to
=
{
'/home/profile'
}
>
<
img
src
=
{
Images
.
setting
}
style
=
{{
height
:
20
,
width
:
20
,
marginRight
:
20
}}
/
>
<
img
src
=
{
Images
.
setting
}
style
=
{{
height
:
20
,
width
:
20
,
marginRight
:
20
}}
/
>
<
Typography
>
Settings
<
/Typography
>
<
Typography
>
Settings
<
/Typography
>
<
/Link
>
<
/div
>
<
/div
>
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
onClick
=
{
handleClose
}
>
<
MenuItem
onClick
=
{
handleClose
}
>
...
@@ -80,24 +85,49 @@ const footerStyle = {
...
@@ -80,24 +85,49 @@ const footerStyle = {
// borderTop: "1px solid #E7E7E7",
// borderTop: "1px solid #E7E7E7",
textAlign
:
"center"
,
textAlign
:
"center"
,
padding
:
"20px"
,
padding
:
"20px"
,
left
:
"0"
,
left
:
0
,
bottom
:
"0"
,
bottom
:
0
,
right
:
0
,
height
:
"80px"
,
height
:
"80px"
,
width
:
"100%"
width
:
"100%"
};
};
const
phantomStyle
=
{
const
phantomStyle
=
{
display
:
"block"
,
display
:
"block"
,
};
};
function
Footer
({
children
})
{
function
Footer
({
children
})
{
return
(
return
(
<
div
>
<
div
>
{
/* <div style={phantomStyle} /> */
}
{
/* <div style={phantomStyle} /> */
}
<
div
style
=
{
footerStyle
}
>
{
children
}
<
/div
>
<
div
style
=
{
footerStyle
}
>
{
children
}
<
/div
>
<
/div
>
<
/div
>
);
);
}
function
getWindowDimensions
()
{
const
{
innerWidth
:
width
,
innerHeight
:
height
}
=
window
;
return
{
width
,
height
};
}
function
UseWindowDimensions
()
{
const
[
windowDimensions
,
setWindowDimensions
]
=
useState
(
getWindowDimensions
()
);
useEffect
(()
=>
{
function
handleResize
()
{
setWindowDimensions
(
getWindowDimensions
());
}
}
window
.
addEventListener
(
"resize"
,
handleResize
);
return
()
=>
window
.
removeEventListener
(
"resize"
,
handleResize
);
},
[]);
return
windowDimensions
;
}
export
{
FadeMenu
,
Footer
};
export
{
FadeMenu
,
Footer
,
UseWindowDimensions
};
\ No newline at end of file
\ No newline at end of file
src/container/Profile.js
View file @
e99a9640
This diff is collapsed.
Click to expand it.
src/router/homeRoutes.js
View file @
e99a9640
...
@@ -5,6 +5,7 @@ import ApprovalMatrix from '../container/ApprovalMatrix'
...
@@ -5,6 +5,7 @@ import ApprovalMatrix from '../container/ApprovalMatrix'
import
BudgetTahunan
from
'../container/BudgetTahunan'
;
import
BudgetTahunan
from
'../container/BudgetTahunan'
;
import
HomePage
from
'../container/HomePage'
;
import
HomePage
from
'../container/HomePage'
;
import
BalanceSheet
from
'../container/BudgetTahunan/BalanceSheet'
;
import
BalanceSheet
from
'../container/BudgetTahunan/BalanceSheet'
;
import
Profile
from
'../container/Profile'
;
const
routes
=
[
const
routes
=
[
{
{
...
@@ -23,7 +24,11 @@ const routes = [
...
@@ -23,7 +24,11 @@ const routes = [
path
:
"/home/budget-tahunan"
,
path
:
"/home/budget-tahunan"
,
main
:
BalanceSheet
main
:
BalanceSheet
},
},
{
path
:
"/home/profile"
,
main
:
Profile
},
];
];
export
default
routes
;
export
default
routes
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment