-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Charlie ⚡
committed
Sep 5, 2022
1 parent
e3875bc
commit c97b8e0
Showing
8 changed files
with
69 additions
and
30 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
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,40 @@ | ||
import { useCallback } from "react"; | ||
import { FiRss } from "react-icons/fi"; | ||
import { addFeed } from "../../lib/fetcher"; | ||
|
||
interface RecommendationCardProps { | ||
displayName: string; | ||
link: string; | ||
type?: "feed" | "twitter"; | ||
} | ||
|
||
export const RecommendationCard = ({ displayName, link }: RecommendationCardProps) => { | ||
const handleClick = useCallback(() => { | ||
return addFeed(link); | ||
}, [link]); | ||
|
||
return ( | ||
<div className="divide-y divide-zinc-500 rounded-lg bg-white dark:bg-zinc-800"> | ||
<div className="flex w-full items-center justify-between space-x-6 p-6"> | ||
<div className="flex-1 truncate"> | ||
<div className="flex items-center space-x-3"> | ||
<h3 className="truncate text-sm font-medium">{displayName}</h3> | ||
</div> | ||
<p className="mt-1 truncate text-sm text-zinc-500">{link}</p> | ||
</div> | ||
</div> | ||
<div> | ||
<div className="-mt-px flex divide-x divide-zinc-500"> | ||
<div className="flex w-0 flex-1"> | ||
<button | ||
onClick={handleClick} | ||
className="relative -mr-px inline-flex w-0 flex-1 items-center justify-center rounded-bl-lg border border-transparent py-4 text-sm font-medium hover:text-gray-500"> | ||
<FiRss className="h-5 w-5 text-zinc-400" aria-hidden="true" /> | ||
<span className="ml-3">Subscribe</span> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
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
c97b8e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
reubin – ./
reubin-site.vercel.app
reubin-hephaestus.vercel.app
alpha.reubin.app
reubin-git-main-hephaestus.vercel.app
reubin.app
pre-alpha.reubin.app