Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gatsby Theme Onegeo
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OneGeo Suite
Libs
Gatsby Theme Onegeo
Commits
16f29cee
Commit
16f29cee
authored
1 year ago
by
Julien MARGAIL
Browse files
Options
Downloads
Patches
Plain Diff
add badge, date, export utils (v0.7.9)
parent
3c030205
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+8
-0
8 additions, 0 deletions
CHANGELOG.md
index.js
+2
-0
2 additions, 0 deletions
index.js
src/components/Section.tsx
+1
-0
1 addition, 0 deletions
src/components/Section.tsx
src/utils.ts
+6
-2
6 additions, 2 deletions
src/utils.ts
with
17 additions
and
2 deletions
CHANGELOG.md
+
8
−
0
View file @
16f29cee
...
...
@@ -21,6 +21,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security
## [0.7.9] - 2023-05-12
### Added
-
Card badge and date
-
Format date in news
-
export utils (isArray, isBoolean, isObject, isString, merge)
## [0.7.8] - 2023-05-10
### Fixed
...
...
This diff is collapsed.
Click to expand it.
index.js
+
2
−
0
View file @
16f29cee
...
...
@@ -64,5 +64,7 @@ export { default as Marquee } from "./src/components/core/Marquee"
// Text component
export
{
default
as
Text
}
from
"
./src/components/Text
"
export
{
isArray
,
isBoolean
,
isObject
,
isString
,
merge
}
from
"
./src/utils
"
//Page context
export
{
usePageContext
}
from
"
./src/context/page
"
This diff is collapsed.
Click to expand it.
src/components/Section.tsx
+
1
−
0
View file @
16f29cee
...
...
@@ -156,6 +156,7 @@ const Section = (props: ISection) => {
>
{
section
.
components
.
map
((
component
)
=>
{
const
dtComponent
=
component
.
components_id
if
(
!
dtComponent
)
return
null
return
(
<
React
.
Fragment
key
=
{
dtComponent
.
id
}
>
...
...
This diff is collapsed.
Click to expand it.
src/utils.ts
+
6
−
2
View file @
16f29cee
...
...
@@ -4,14 +4,18 @@ export const isString = (val) => {
return
Object
.
prototype
.
toString
.
call
(
val
)
===
"
[object String]
"
}
export
const
isArray
=
(
obj
)
=>
{
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
"
[object Array]
"
}
export
const
isObject
=
(
obj
)
=>
{
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
"
[object Object]
"
}
// Thanks ChatGPT ;)
export
const
merge
=
(
obj1
:
object
,
obj2
:
object
):
object
=>
{
if
(
!
obj1
)
return
obj2
if
(
!
obj2
)
return
obj1
if
(
!
obj1
)
return
obj2
if
(
!
obj2
)
return
obj1
for
(
let
key
in
obj2
)
{
if
(
obj2
.
hasOwnProperty
(
key
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment