-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 (.git/hooks/husky.local.sh) Fixing pre-commit hook not running
post install script was set to all workspaces to reset husky.local.sh -> see typicode/husky#677
- Loading branch information
Romain Lambert
committed
Jan 23, 2021
1 parent
e7e3069
commit 44182ec
Showing
12 changed files
with
147,701 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
# https://github.com/yarnpkg/yarn/issues/8405 | ||
|
||
|
||
yarn-path ".yarn/releases/yarn-1.19.0.cjs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React, { forwardRef } from 'react'; | ||
import { GatsbyLinkProps, Link as GatsbyLink } from 'gatsby'; | ||
|
||
const LinkComponent = ( | ||
{ to, target, children, ...rest }: GatsbyLinkProps<any>, | ||
ref: React.LegacyRef<HTMLAnchorElement>, | ||
): JSX.Element => { | ||
// If external | ||
if (to.indexOf('http') !== -1) { | ||
return ( | ||
<a | ||
ref={ref} | ||
href={to} | ||
target={target} | ||
rel="noreferrer noopener" | ||
{...rest} | ||
> | ||
{children} | ||
</a> | ||
); | ||
} | ||
|
||
// If internal | ||
return ( | ||
// @ts-ignore | ||
<GatsbyLink ref={ref} to={`/${to}`} target={target} {...rest}> | ||
{children} | ||
</GatsbyLink> | ||
); | ||
}; | ||
|
||
const Link = forwardRef(LinkComponent); | ||
|
||
export default Link; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './Link'; |
6 changes: 5 additions & 1 deletion
6
projects/namur/src/components/organisms/layout/PrimaryLayout/PrimaryLayout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import React from 'react'; | ||
import Header from '@/components/organisms/layout/Header'; | ||
|
||
interface LayoutProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const PrimaryLayout = ({ children }: LayoutProps): JSX.Element => ( | ||
<main role="main">{children}</main> | ||
<> | ||
<Header /> | ||
<main role="main">{children}</main> | ||
</> | ||
); | ||
|
||
export default PrimaryLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"Main": { | ||
"links": { | ||
"type": "Group", | ||
"config": { | ||
"fields": { | ||
"label": { | ||
"type": "Text", | ||
"config": { | ||
"label": "label", | ||
"placeholder": "Link label" | ||
} | ||
}, | ||
"path": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "path", | ||
"placeholder": "Link path" | ||
} | ||
} | ||
}, | ||
"label": "links" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
interface LinkProps { | ||
label: string; | ||
path: string; | ||
target?: string; | ||
} | ||
|
||
export default LinkProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.