Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sanity Exhibition Nansen
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
Utstillinger
Sanity Exhibition Nansen
Commits
d2b581b0
Commit
d2b581b0
authored
3 years ago
by
Tarje.Lavik
Browse files
Options
Downloads
Patches
Plain Diff
Style links
parent
2c4a9a62
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/components/Link/index.js
+3
-3
3 additions, 3 deletions
web/components/Link/index.js
web/components/PT/PortableTextBlock.js
+3
-7
3 additions, 7 deletions
web/components/PT/PortableTextBlock.js
with
6 additions
and
10 deletions
web/components/Link/index.js
+
3
−
3
View file @
d2b581b0
...
...
@@ -7,8 +7,8 @@ export default function Link({ href, children }) {
}
return
(
<
ChakraLink
as
=
{
NextLink
}
href
=
{
href
}
>
{
children
}
<
/
Chakra
Link
>
<
NextLink
href
=
{
href
}
passHref
>
<
ChakraLink
color
=
"
teal.600
"
>
{
children
}
<
/ChakraLink
>
<
/
Next
Link
>
)
}
This diff is collapsed.
Click to expand it.
web/components/PT/PortableTextBlock.js
+
3
−
7
View file @
d2b581b0
import
React
from
'
react
'
import
NextLink
from
'
next/link
'
import
{
kebabCase
}
from
'
lodash
'
import
{
Heading
,
Link
,
Text
}
from
'
@chakra-ui/react
'
import
Link
from
'
../Link
'
import
{
Heading
,
Text
}
from
'
@chakra-ui/react
'
import
{
BigText
,
Hero
,
...
...
@@ -103,11 +103,7 @@ export default function PortableTextBlock(props) {
const
{
reference
}
=
mark
const
href
=
`/id/
${
reference
.
_ref
}
`
const
text
=
children
.
length
?
children
[
0
]
:
children
return
(
<
Link
as
=
{
NextLink
}
href
=
{
href
}
>
{
text
}
<
/Link
>
)
return
<
Link
href
=
{
href
}
>
{
text
}
<
/Link
>
},
link
:
({
mark
,
children
})
=>
{
// console.log(children)
...
...
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