Skip to content

Commit

Permalink
adding messages
Browse files Browse the repository at this point in the history
  • Loading branch information
IslemMedjahdi committed Jan 11, 2023
1 parent b1ae4c3 commit 868963b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const AddAnnouncementIndex = () => {
const [photos, setPhotos] = useState<(Blob | null)[]>([]);
const [loading, setLoading] = useState(false);

const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setAnnouncement((prev) => ({ ...prev, [e.target.name]: e.target.value }));
};

const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (
Expand Down
14 changes: 7 additions & 7 deletions src/components/announcements/preview-annoucement/PosterInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ const PosterInfo: React.FC<Props> = ({ email, firstName, lastName, phone }) => {
</p>
</div>
</div>
<div>
<div className="flex flex-col items-center">
<p className="text-center font-serif font-bold ">
<span className="capitalize"> {firstName.toLowerCase()} </span>
<span className="capitalize">{lastName.toLowerCase()}</span>
</p>
<a
href={`mailto:${email}`}
className="text-sm font-medium hover:underline"
>
{email}
</a>
{phone && (
<a
href={`tel:${phone}`}
Expand All @@ -34,12 +40,6 @@ const PosterInfo: React.FC<Props> = ({ email, firstName, lastName, phone }) => {
{phone}
</a>
)}
<a
href={`mailto:${email}`}
className="text-sm font-medium hover:underline"
>
{email}
</a>
</div>
<Link
href={"#"}
Expand Down
12 changes: 12 additions & 0 deletions src/services/message.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class MessageService {
private static instance: MessageService;

public static getInstance(): MessageService {
if (!this.instance) {
this.instance = new MessageService();
}
return this.instance;
}
}

export default MessageService;

0 comments on commit 868963b

Please sign in to comment.