Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
feat: add timeline EmptyState component
Browse files Browse the repository at this point in the history
  • Loading branch information
peterleiva committed Dec 22, 2021
1 parent 5a92c16 commit 13a224c
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
63 changes: 63 additions & 0 deletions public/timeline-empty-state.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/features/timeline/EmptyState.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { EmptyState, Button } from "components";
import Image from "next/image";
import src from "../../../public/timeline-empty-state.svg";
import { FaPlus as PlusIcon } from "react-icons/fa";

export default function TimelineEmptyState() {
return (
<EmptyState
image={<Image src={src} alt="no threads in timeline" />}
tagline="Make history. Lead the way"
description="Starting a conversation you can share you thoughts and rise a topic for anyone in the community. "
>
<Button Icon={PlusIcon}>Start an conversation</Button>
</EmptyState>
);
}
5 changes: 5 additions & 0 deletions src/features/timeline/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import type { Thread } from "types";
import EmptyState from "./EmptyState";
import ThreadCard from "./ThreadCard";

type TimelineProps = {
threads: Thread[];
};

export default function Timeline({ threads }: TimelineProps): JSX.Element {
if (threads.length == 0) {
return <EmptyState />;
}

return (
<>
{threads.map(thread => (
Expand Down

0 comments on commit 13a224c

Please sign in to comment.