Skip to content

Commit

Permalink
core package rearrangements
Browse files Browse the repository at this point in the history
  • Loading branch information
olayway committed Mar 9, 2023
1 parent 5d4cb5c commit d32a195
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/ui/Base/CustomLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link.js";
import { Tooltip } from "../Tooltip";
import TwitterEmbed from "./TwitterEmbed";
import { TwitterEmbed } from "../Twitter";

const TWITTER_REGEX =
/^https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)/;
Expand Down
21 changes: 0 additions & 21 deletions packages/core/src/ui/Blog/Avatar.jsx

This file was deleted.

1 change: 1 addition & 0 deletions packages/core/src/ui/Blog/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { BlogsList } from "./BlogsList";
export { BlogItem } from "./BlogItem";
4 changes: 4 additions & 0 deletions packages/core/src/ui/Layout/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { Layout } from "./Layout";
export { TableOfContents } from "./TableOfContents";
export { useTableOfContents } from "./useTableOfContents";
export { Footer } from "./Footer";
export { EditThisPage } from "./EditThisPage";
2 changes: 1 addition & 1 deletion packages/core/src/ui/Nav/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";

import { ThemeSelector } from "../Base";
import { ThemeSelector } from "../ThemeSelector";
import { SearchContext, SearchField } from "../Search";
import { NavMobile } from "./NavMobile";
import { NavItem } from "./NavItem";
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/core/src/ui/ThemeSelector/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ThemeSelector } from "./ThemeSelector";
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare global {
}
}

export default function TwitterEmbed({ url, ...props }) {
export function TwitterEmbed({ url, ...props }) {
const ref = useRef<HTMLDivElement | null>(null);
const [tweetState, setTweetState] = useState<TweetState>(TweetState.LOADING);

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/ui/Twitter/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { TwitterEmbed } from "./TwitterEmbed";
11 changes: 9 additions & 2 deletions packages/core/src/ui/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
export { Avatar } from "./Avatar";
export { ThemeProvider } from "next-themes";
export { Nav } from "./Nav";
export { SearchProvider } from "./Search";
export { Layout } from "./Layout";
export {
Layout,
Footer,
EditThisPage,
TableOfContents,
useTableOfContents,
} from "./Layout";
export { Pre } from "./Pre";
export { CustomLink } from "./Base/CustomLink";
export { BlogsList } from "./Blog";
export { BlogsList, BlogItem } from "./Blog";
export { SimpleLayout } from "./SimpleLayout";
export { DocsLayout } from "./DocsLayout";
export { UnstyledLayout } from "./UnstyledLayout";
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { pageview } from "./gtag";
export { collectHeadings } from "./collectHeadings";
export { formatDate } from "./formatDate";

0 comments on commit d32a195

Please sign in to comment.