Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Embedded Genesys UI
Commits
5f9c0696
Commit
5f9c0696
authored
Nov 30, 2020
by
Matija Obreza
Browse files
PoweredBy component
parent
dc268d33
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/genesys.tsx
View file @
5f9c0696
...
...
@@ -15,6 +15,7 @@ import { Config } from 'config/config';
import
rootReducer
from
'
core/reducer
'
;
import
{
setConfig
}
from
'
core/actions/appConfig
'
;
import
OverviewPage
from
'
accession/OverviewPage
'
;
import
PoweredBy
from
'
ui/common/PoweredBy
'
;
declare
const
window
:
Window
&
{
devToolsExtension
:
any
,
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
:
any
};
const
composeEnhancers
=
window
.
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
||
compose
;
...
...
@@ -66,6 +67,7 @@ export function showGenesysUI(holdingNode: HTMLElement, config: Config) {
<
HelmetProvider
>
<
App
/>
</
HelmetProvider
>
<
PoweredBy
/>
</
Provider
>,
holdingNode
,
);
...
...
@@ -90,7 +92,10 @@ export function showOverview(holdingNode: HTMLElement, config: Config) {
ReactDOM
.
render
(
<
Provider
store
=
{
store
}
>
<
OverviewPage
/>
<
HelmetProvider
>
<
OverviewPage
/>
</
HelmetProvider
>
<
PoweredBy
/>
</
Provider
>,
holdingNode
,
);
...
...
src/ui/common/PoweredBy.tsx
0 → 100644
View file @
5f9c0696
import
{
WithConfig
}
from
'
config/config
'
;
import
*
as
React
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
const
PoweredBy
=
({
appConfig
}:
WithConfig
)
=>
(
<
div
style
=
{
{
marginTop
:
20
,
textAlign
:
'
center
'
,
fontSize
:
'
10pt
'
,
display
:
'
block
'
,
visibility
:
'
visible
'
}
}
>
<
img
style
=
{
{
height
:
'
1.2em
'
,
verticalAlign
:
'
text-bottom
'
,
display
:
'
inline
'
,
visibility
:
'
visible
'
}
}
src
=
{
`
${
appConfig
.
apiUrl
}
/html/1/images/GENESYS-ICON.svg`
}
alt
=
"Genesys PGR"
/>
<>
Powered by
<
a
target
=
"_blank"
style
=
{
{
display
:
'
inline
'
,
visibility
:
'
visible
'
}
}
title
=
"Data sourced from Genesys"
href
=
{
appConfig
.
apiUrl
}
>
Genesys PGR
</
a
></>
</
div
>
);
const
mapStateToProps
=
(
state
)
=>
({
appConfig
:
state
.
appConfig
.
config
,
});
export
default
connect
(
mapStateToProps
,
null
)(
PoweredBy
);
src/ui/core/App.tsx
View file @
5f9c0696
...
...
@@ -27,7 +27,7 @@ class App extends React.Component<IAppProps & WithTranslation & WithConfig, any>
}
public
render
()
{
const
{
appConfig
:
{
apiUrl
,
shoppingCart
}
}
=
this
.
props
;
const
{
appConfig
:
{
shoppingCart
}
}
=
this
.
props
;
return
(
<>
...
...
@@ -42,11 +42,6 @@ class App extends React.Component<IAppProps & WithTranslation & WithConfig, any>
{
shoppingCart
.
enabled
&&
<
Route
path
=
"/request"
exact
component
=
{
RequestPage
}
/>
}
<
Route
component
=
{
NotFound
}
/>
</
Switch
>
<
div
style
=
{
{
marginTop
:
20
,
textAlign
:
'
center
'
,
fontSize
:
'
10pt
'
}
}
>
<
img
style
=
{
{
height
:
'
1.2em
'
,
verticalAlign
:
'
text-bottom
'
}
}
src
=
{
`
${
apiUrl
}
/html/1/images/GENESYS-ICON.svg`
}
alt
=
"Genesys PGR"
/>
<>
Powered by
<
a
target
=
"_blank"
title
=
"Data sourced from Genesys"
href
=
{
apiUrl
}
>
Genesys PGR
</
a
></>
</
div
>
</
div
>
</
Router
>
</>
...
...
Write
Preview
Supports
Markdown
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