-
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.
Remove typescript cause build was stack in type checking
- Loading branch information
Mojib Mohammad
authored and
Mojib Mohammad
committed
Feb 27, 2022
1 parent
fa349ad
commit 3127703
Showing
77 changed files
with
195 additions
and
661 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
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,18 @@ | ||
import {cloneElement, Children} from 'react' | ||
import Link from 'next/link' | ||
import {withRouter} from 'next/router' | ||
|
||
const ActiveLink = ({router, children, href, ...rest}) => { | ||
return ( | ||
<Link href={href} {...rest}> | ||
{cloneElement(Children.only(children), { | ||
className: | ||
router.pathname === /\// || router.asPath === rest.href | ||
? `active ${children.props.className}` | ||
: children.props.className, | ||
})} | ||
</Link> | ||
) | ||
} | ||
|
||
export default withRouter(ActiveLink) |
This file was deleted.
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
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
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,6 @@ | ||
import {parseISO, format} from 'date-fns' | ||
import {FC} from 'react' | ||
|
||
interface Props { | ||
dateString: string | ||
} | ||
|
||
const DateFormatter: FC<Props> = ({dateString}) => { | ||
const DateFormatter = ({dateString}) => { | ||
const date = parseISO(dateString) | ||
return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time> | ||
} |
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,7 @@ | ||
import NextImage from 'next/image' | ||
|
||
const Image = props => { | ||
return <NextImage {...props} /> | ||
} | ||
|
||
export default Image |
This file was deleted.
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
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,27 @@ | ||
import Link from 'next/link' | ||
|
||
const CustomLink = props => { | ||
const {href, ...rest} = props | ||
const internalLink = href.toString().startsWith('/') | ||
const anchorLink = href.toString().startsWith('/#') | ||
|
||
if (internalLink) | ||
return ( | ||
<Link href={href}> | ||
<a {...rest} /> | ||
</Link> | ||
) | ||
|
||
if (anchorLink) return <a href={href?.toString()} {...rest} /> | ||
|
||
return ( | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={href?.toString()} | ||
{...rest} | ||
/> | ||
) | ||
} | ||
|
||
export default CustomLink |
This file was deleted.
Oops, something went wrong.
12 changes: 4 additions & 8 deletions
12
components/MDXComponents.tsx → components/MDXComponents.jsx
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
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
Oops, something went wrong.