mirror of
https://github.com/tuna2134/cecilia.git
synced 2026-07-26 07:01:34 +00:00
fix
This commit is contained in:
28
src/components/pages/Home/Activity.tsx
Normal file
28
src/components/pages/Home/Activity.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export interface ActivityData {
|
||||
title: string;
|
||||
description: string;
|
||||
url: string | null;
|
||||
}
|
||||
|
||||
interface ActivityProps {
|
||||
activity: ActivityData;
|
||||
}
|
||||
|
||||
export const Activity: React.FC<ActivityProps> = ({ activity }) => {
|
||||
return (
|
||||
<div className="p-4 border border-gray-300 rounded-lg mb-4 flex flex-col">
|
||||
<h4 className="text-lg font-semibold">{activity.title}</h4>
|
||||
<p className="grow mb-2 text-gray-700">{activity.description}</p>
|
||||
{activity.url && (
|
||||
<Link
|
||||
href={activity.url}
|
||||
className="text-blue-500 hover:underline text-sm"
|
||||
>
|
||||
詳細
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user