diff --git a/packages/web/components/templates/homeFeed/EmptyLibrary.tsx b/packages/web/components/templates/homeFeed/EmptyLibrary.tsx
new file mode 100644
index 000000000..7d3479c3a
--- /dev/null
+++ b/packages/web/components/templates/homeFeed/EmptyLibrary.tsx
@@ -0,0 +1,36 @@
+
+
+// There aren't any discussions.
+// You can open a new discussion to ask questions about this repository or get help.
+
+import Link from 'next/link'
+import { Book } from 'phosphor-react'
+import { LibraryItem } from '../../../lib/networking/queries/useGetLibraryItemsQuery'
+import { Button } from '../../elements/Button'
+import { Box, VStack } from '../../elements/LayoutPrimitives'
+import { StyledText } from '../../elements/StyledText'
+import { LinkedItemCardAction } from '../../patterns/LibraryCards/CardTypes'
+import { theme } from '../../tokens/stitches.config'
+
+type EmptyLibraryProps = {
+ onAddLinkClicked: () => void
+}
+
+export function EmptyLibrary(props: EmptyLibraryProps): JSX.Element {
+ return (
+
+
+
+ No results found.
+
+
+
+ You can add a link or read more about Omnivore's advanced search.
+
+
+
+
+ )
+}
diff --git a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx
index c8dfb20f4..6a515d1c4 100644
--- a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx
+++ b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx
@@ -38,6 +38,7 @@ import { ConfirmationModal } from '../../patterns/ConfirmationModal'
import { SetLabelsModal } from '../article/SetLabelsModal'
import { Label } from '../../../lib/networking/fragments/labelFragment'
import { isVipUser } from '../../../lib/featureFlag'
+import { EmptyLibrary } from './EmptyLibrary'
export type LayoutType = 'LIST_LAYOUT' | 'GRID_LAYOUT'
@@ -604,95 +605,97 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
}
)}
-
- {props.items.map((linkedItem) => (
- div': {
- bg: '$grayBg',
- },
- '&:focus': {
- '> div': {
- bg: '$grayBgActive',
+ {props.items.length == 0 ? { props.setShowAddLinkModal(true) }} /> : (
+
+ {props.items.map((linkedItem) => (
+ div': {
+ bg: '$grayBg',
},
- },
- '&:hover': {
- '> div': {
- bg: '$grayBgActive',
+ '&:focus': {
+ '> div': {
+ bg: '$grayBgActive',
+ },
},
- },
- }}
- >
- {viewerData?.me && (
- {
- if (action === 'delete') {
- setShowRemoveLinkConfirmation(true)
- setLinkToRemove(linkedItem)
- } else {
- props.actionHandler(action, linkedItem)
- }
- }}
- />
- )}
-
- ))}
-
-
- {props.hasMore ? (
-
- ) : (
-
+ '&:hover': {
+ '> div': {
+ bg: '$grayBgActive',
+ },
+ },
+ }}
+ >
+ {viewerData?.me && (
+ {
+ if (action === 'delete') {
+ setShowRemoveLinkConfirmation(true)
+ setLinkToRemove(linkedItem)
+ } else {
+ props.actionHandler(action, linkedItem)
+ }
+ }}
+ />
+ )}
+
+ ))}
+
)}
-
+
+ {props.hasMore ? (
+
+ ) : (
+
+ )}
+
{props.showAddLinkModal && (
props.setShowAddLinkModal(false)} />
diff --git a/packages/web/stories/EmptyLibrary.stories.tsx b/packages/web/stories/EmptyLibrary.stories.tsx
new file mode 100644
index 000000000..4a04f23fe
--- /dev/null
+++ b/packages/web/stories/EmptyLibrary.stories.tsx
@@ -0,0 +1,19 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react'
+import { EmptyLibrary } from '../components/templates/homeFeed/EmptyLibrary'
+
+export default {
+ title: 'Components/EmptyLibraryStory',
+ component: EmptyLibrary,
+ argTypes: {
+ position: {
+ description: 'The empty library component',
+ control: { type: 'select' },
+ },
+ },
+} as ComponentMeta
+
+export const EmptyLibraryStory: ComponentStory = (args: any) => {
+ return (
+
+ )
+}