diff --git a/.prettierrc.json b/.prettierrc.json index a048bb8..937375d 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,4 @@ { "semi": true, "singleQuote": true -} \ No newline at end of file +} diff --git a/components/DarkModeBtn.tsx b/components/DarkModeBtn.tsx index dd8b724..d08501a 100644 --- a/components/DarkModeBtn.tsx +++ b/components/DarkModeBtn.tsx @@ -36,4 +36,4 @@ const DarkModeBtn = () => { ); }; -export default memo(DarkModeBtn); \ No newline at end of file +export default memo(DarkModeBtn); diff --git a/components/Footer.tsx b/components/Footer.tsx index c7088ed..697c9e4 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -26,4 +26,4 @@ const Footer = () => { ); }; -export default memo(Footer); \ No newline at end of file +export default memo(Footer); diff --git a/components/NavBar.tsx b/components/NavBar.tsx index 1fcf855..af9b3da 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -162,4 +162,4 @@ const HeadBar = () => { ); }; -export default memo(HeadBar); \ No newline at end of file +export default memo(HeadBar); diff --git a/components/PostCard.tsx b/components/PostCard.tsx index 369d16d..77a24a4 100644 --- a/components/PostCard.tsx +++ b/components/PostCard.tsx @@ -51,4 +51,4 @@ const PostCard = ({ post }: Props) => { ); }; -export default memo(PostCard); \ No newline at end of file +export default memo(PostCard); diff --git a/components/RUA/Button.tsx b/components/RUA/Button.tsx index 77cf19e..8fede01 100644 --- a/components/RUA/Button.tsx +++ b/components/RUA/Button.tsx @@ -36,4 +36,4 @@ const Button = ({ children, ...rest }: ButtonProps) => { ); }; -export default memo(Button); \ No newline at end of file +export default memo(Button); diff --git a/components/RUA/RUACodeSandbox.tsx b/components/RUA/RUACodeSandbox.tsx index bf37291..8e3464c 100644 --- a/components/RUA/RUACodeSandbox.tsx +++ b/components/RUA/RUACodeSandbox.tsx @@ -4,8 +4,8 @@ import { useTheme } from 'next-themes'; import { memo, useEffect, useState } from 'react'; import RUALoading from './loading/RUALoading'; -const partten = - /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/; +const pattern = + /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/; export const commonClass = clsx( 'rounded-lg h-[500px] border-0', 'overflow-hidden w-full' @@ -16,7 +16,7 @@ type Props = { }; const RUACodeSandbox = ({ url }: Props) => { - const isUrl = partten.test(url); + const isUrl = pattern.test(url); const { systemTheme, theme } = useTheme(); const currentTheme = theme === 'system' ? systemTheme : theme ?? 'light'; @@ -64,4 +64,4 @@ const RUACodeSandbox = ({ url }: Props) => { ); }; -export default memo(RUACodeSandbox); \ No newline at end of file +export default memo(RUACodeSandbox); diff --git a/components/RUA/RUACodepen.tsx b/components/RUA/RUACodepen.tsx index 2068b69..c51df0f 100644 --- a/components/RUA/RUACodepen.tsx +++ b/components/RUA/RUACodepen.tsx @@ -80,4 +80,4 @@ const RUACodepen = ({ defaultTab, url }: Props) => { ); }; -export default memo(RUACodepen); \ No newline at end of file +export default memo(RUACodepen); diff --git a/components/RUA/RUAPagination.tsx b/components/RUA/RUAPagination.tsx index 3ba35e2..c566f3f 100644 --- a/components/RUA/RUAPagination.tsx +++ b/components/RUA/RUAPagination.tsx @@ -59,4 +59,4 @@ const RUAPagination = ({ ); }; -export default memo(RUAPagination); \ No newline at end of file +export default memo(RUAPagination); diff --git a/components/RUA/RUASandpack.tsx b/components/RUA/RUASandpack.tsx index 1992d60..ea0e0ba 100644 --- a/components/RUA/RUASandpack.tsx +++ b/components/RUA/RUASandpack.tsx @@ -20,4 +20,4 @@ const RUASandpack = ({ ...rest }: Props) => { ); }; -export default memo(RUASandpack); \ No newline at end of file +export default memo(RUASandpack); diff --git a/components/RUA/loading/PostCardLoading.tsx b/components/RUA/loading/PostCardLoading.tsx index cbdc9c6..85bc622 100644 --- a/components/RUA/loading/PostCardLoading.tsx +++ b/components/RUA/loading/PostCardLoading.tsx @@ -26,4 +26,4 @@ const PostCardLoading = () => { ); }; -export default memo(PostCardLoading); \ No newline at end of file +export default memo(PostCardLoading); diff --git a/components/RUA/loading/RUALoading.tsx b/components/RUA/loading/RUALoading.tsx index c0728c6..c8ed2f5 100644 --- a/components/RUA/loading/RUALoading.tsx +++ b/components/RUA/loading/RUALoading.tsx @@ -34,4 +34,4 @@ const RUALoading = ({ className: classNames }: Props) => { ); }; -export default memo(RUALoading); \ No newline at end of file +export default memo(RUALoading); diff --git a/components/RUA/loading/VercelLoading.tsx b/components/RUA/loading/VercelLoading.tsx index d56e9f0..bec2c6f 100644 --- a/components/RUA/loading/VercelLoading.tsx +++ b/components/RUA/loading/VercelLoading.tsx @@ -41,4 +41,4 @@ const VercelLoading = () => { ); }; -export default memo(VercelLoading); \ No newline at end of file +export default memo(VercelLoading); diff --git a/components/RUA/tab/TabItem.tsx b/components/RUA/tab/TabItem.tsx index 2744404..6e62da4 100644 --- a/components/RUA/tab/TabItem.tsx +++ b/components/RUA/tab/TabItem.tsx @@ -16,4 +16,4 @@ const TabItem = ({ showContent, children }: ItemProps) => { ); }; -export default memo(TabItem); \ No newline at end of file +export default memo(TabItem); diff --git a/components/RUA/tab/index.tsx b/components/RUA/tab/index.tsx index e2da7ed..bcf4738 100644 --- a/components/RUA/tab/index.tsx +++ b/components/RUA/tab/index.tsx @@ -56,4 +56,4 @@ const Tab = ({ defaultValue, children }: Props) => { ); }; -export default memo(Tab); \ No newline at end of file +export default memo(Tab); diff --git a/components/common/BackToTop.tsx b/components/common/BackToTop.tsx index 0713c46..e5869aa 100644 --- a/components/common/BackToTop.tsx +++ b/components/common/BackToTop.tsx @@ -47,4 +47,4 @@ const BackToTop = () => { ); }; -export default memo(BackToTop); \ No newline at end of file +export default memo(BackToTop); diff --git a/components/gists/FileContent.tsx b/components/gists/FileContent.tsx index d94616a..1db6208 100644 --- a/components/gists/FileContent.tsx +++ b/components/gists/FileContent.tsx @@ -50,4 +50,4 @@ const FileContent = ({ gists }: Props) => { ); }; -export default memo(FileContent); \ No newline at end of file +export default memo(FileContent); diff --git a/components/gists/GistsCode.tsx b/components/gists/GistsCode.tsx index 12bdf5e..77f39a2 100644 --- a/components/gists/GistsCode.tsx +++ b/components/gists/GistsCode.tsx @@ -76,4 +76,4 @@ const GistsCode = ({ file, showFileName = false }: Props) => { ); }; -export default memo(GistsCode); \ No newline at end of file +export default memo(GistsCode); diff --git a/components/gists/UserInfo.tsx b/components/gists/UserInfo.tsx index 3063362..1b6e203 100644 --- a/components/gists/UserInfo.tsx +++ b/components/gists/UserInfo.tsx @@ -80,4 +80,4 @@ const UserInfo = ({ user }: Props) => { ); }; -export default memo(UserInfo); \ No newline at end of file +export default memo(UserInfo); diff --git a/components/mdx/Anchor.tsx b/components/mdx/Anchor.tsx index c2214bf..efa01c1 100644 --- a/components/mdx/Anchor.tsx +++ b/components/mdx/Anchor.tsx @@ -36,4 +36,4 @@ const Anchor = forwardRef( Anchor.displayName = 'Anchor'; -export default memo(Anchor); \ No newline at end of file +export default memo(Anchor); diff --git a/components/mdx/Image.tsx b/components/mdx/Image.tsx index 9381b46..9bd6296 100644 --- a/components/mdx/Image.tsx +++ b/components/mdx/Image.tsx @@ -19,4 +19,4 @@ const Image = ({ alt, ...rest }: Props) => { ); }; -export default memo(Image); \ No newline at end of file +export default memo(Image); diff --git a/components/mdx/LinkAnchor.tsx b/components/mdx/LinkAnchor.tsx index e108ffc..c491130 100644 --- a/components/mdx/LinkAnchor.tsx +++ b/components/mdx/LinkAnchor.tsx @@ -26,4 +26,4 @@ const Anchor = ({ children, external = true }: Props) => { ); }; -export default memo(Anchor); \ No newline at end of file +export default memo(Anchor); diff --git a/components/mdx/Pre.tsx b/components/mdx/Pre.tsx index fcb4ee6..4e42654 100644 --- a/components/mdx/Pre.tsx +++ b/components/mdx/Pre.tsx @@ -39,4 +39,4 @@ const Pre = ({ ...rest }: Props) => { ); }; -export default memo(Pre); \ No newline at end of file +export default memo(Pre); diff --git a/components/post/CopyButton.tsx b/components/post/CopyButton.tsx index 0d8d9e7..2830763 100644 --- a/components/post/CopyButton.tsx +++ b/components/post/CopyButton.tsx @@ -64,4 +64,4 @@ const CopyButton = ({ onCopy: onClick }: CopyButtonProps) => { ); }; -export default memo(CopyButton); \ No newline at end of file +export default memo(CopyButton); diff --git a/components/post/PostComment.tsx b/components/post/PostComment.tsx index 0d2fc34..68a9602 100644 --- a/components/post/PostComment.tsx +++ b/components/post/PostComment.tsx @@ -24,4 +24,4 @@ const PostComment = () => { ); }; -export default memo(PostComment); \ No newline at end of file +export default memo(PostComment); diff --git a/components/post/PostCommnetLine.tsx b/components/post/PostCommnetLine.tsx index 801bf91..f9d0599 100644 --- a/components/post/PostCommnetLine.tsx +++ b/components/post/PostCommnetLine.tsx @@ -29,4 +29,4 @@ const PostCommnetLine = () => { ); }; -export default memo(PostCommnetLine); \ No newline at end of file +export default memo(PostCommnetLine); diff --git a/components/post/PostToc.tsx b/components/post/PostToc.tsx index 7fcdd0c..8328907 100644 --- a/components/post/PostToc.tsx +++ b/components/post/PostToc.tsx @@ -77,4 +77,4 @@ const PostToc = ({ toc, tocLength }: Props) => { ); }; -export default memo(PostToc); \ No newline at end of file +export default memo(PostToc); diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx index 22d6bc9..aad8e73 100644 --- a/layouts/MainLayout.tsx +++ b/layouts/MainLayout.tsx @@ -19,4 +19,4 @@ const MainLayout = ({ children }: Props) => { ); }; -export default MainLayout; \ No newline at end of file +export default MainLayout; diff --git a/lib/utils/index.ts b/lib/utils/index.ts index 1a9deed..2eb3285 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -117,4 +117,4 @@ export const debounce: Debounce = (fn, ms) => { fn.apply(this, args); }, ms); }; -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index 49bea4f..ea3fef1 100644 --- a/package.json +++ b/package.json @@ -59,4 +59,4 @@ "typescript": "4.9.3", "clsx": "^1.2.1" } -} \ No newline at end of file +} diff --git a/pages/_app.tsx b/pages/_app.tsx index f9c8326..3de71f6 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -50,4 +50,4 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) { ); } -export default MyApp; \ No newline at end of file +export default MyApp; diff --git a/pages/about.tsx b/pages/about.tsx index 65b8e3a..a69d6f4 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -204,4 +204,4 @@ About.getLayout = function getLayout(page) { return {page}; }; -export default About; \ No newline at end of file +export default About; diff --git a/pages/blog/[page].tsx b/pages/blog/[page].tsx index 470a624..133eb95 100644 --- a/pages/blog/[page].tsx +++ b/pages/blog/[page].tsx @@ -86,4 +86,4 @@ BlogPage.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default BlogPage; \ No newline at end of file +export default BlogPage; diff --git a/pages/blog/index.tsx b/pages/blog/index.tsx index e08aebe..d17d45b 100644 --- a/pages/blog/index.tsx +++ b/pages/blog/index.tsx @@ -70,4 +70,4 @@ Blog.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default Blog; \ No newline at end of file +export default Blog; diff --git a/pages/g/[id].tsx b/pages/g/[id].tsx index f069667..dd38f31 100644 --- a/pages/g/[id].tsx +++ b/pages/g/[id].tsx @@ -114,4 +114,4 @@ Gist.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default Gist; \ No newline at end of file +export default Gist; diff --git a/pages/gists/[p].tsx b/pages/gists/[p].tsx index a84bd57..b4cc062 100644 --- a/pages/gists/[p].tsx +++ b/pages/gists/[p].tsx @@ -115,4 +115,4 @@ Gists.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default Gists; \ No newline at end of file +export default Gists; diff --git a/pages/gists/index.tsx b/pages/gists/index.tsx index 20c9b7a..a84c2a4 100644 --- a/pages/gists/index.tsx +++ b/pages/gists/index.tsx @@ -84,4 +84,4 @@ Gists.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default Gists; \ No newline at end of file +export default Gists; diff --git a/pages/index.tsx b/pages/index.tsx index 7c769b9..f24ee0d 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -184,4 +184,4 @@ Home.getLayout = function getLayout(page) { return {page}; }; -export default Home; \ No newline at end of file +export default Home; diff --git a/pages/p/[slug].tsx b/pages/p/[slug].tsx index 45208e9..11b0b10 100644 --- a/pages/p/[slug].tsx +++ b/pages/p/[slug].tsx @@ -99,4 +99,4 @@ Slug.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default Slug; \ No newline at end of file +export default Slug; diff --git a/pages/projects.tsx b/pages/projects.tsx index 27730dc..49f4057 100644 --- a/pages/projects.tsx +++ b/pages/projects.tsx @@ -179,4 +179,4 @@ Projects.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default Projects; \ No newline at end of file +export default Projects;