fix: use notify methods correctly from useNotify hook in JobCard
This commit is contained in:
parent
88c142952d
commit
4d3afbb791
1 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,8 @@ interface JobCardProps {
|
||||||
export function JobCard({ job, isApplied, applicationStatus }: JobCardProps) {
|
export function JobCard({ job, isApplied, applicationStatus }: JobCardProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { notify } = useNotify();
|
const notifications = useNotify();
|
||||||
|
|
||||||
const handleShare = (platform: string) => {
|
const handleShare = (platform: string) => {
|
||||||
const url = typeof window !== "undefined" ? `${window.location.origin}/jobs/${job.id}` : `https://local.gohorsejobs.com/jobs/${job.id}`;
|
const url = typeof window !== "undefined" ? `${window.location.origin}/jobs/${job.id}` : `https://local.gohorsejobs.com/jobs/${job.id}`;
|
||||||
const text = `Confira esta vaga: ${job.title} na ${job.company}`;
|
const text = `Confira esta vaga: ${job.title} na ${job.company}`;
|
||||||
|
|
@ -66,7 +67,7 @@ export function JobCard({ job, isApplied, applicationStatus }: JobCardProps) {
|
||||||
break;
|
break;
|
||||||
case 'copy':
|
case 'copy':
|
||||||
navigator.clipboard.writeText(url);
|
navigator.clipboard.writeText(url);
|
||||||
notify.success("Link copiado!", "Link da vaga copiado para a área de transferência.");
|
notifications.success("Link copiado!", "Link da vaga copiado para a área de transferência.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -183,7 +184,6 @@ export function JobCard({ job, isApplied, applicationStatus }: JobCardProps) {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent className="space-y-4 flex-1 flex flex-col">
|
<CardContent className="space-y-4 flex-1 flex flex-col">
|
||||||
{/* Job Meta Information */}
|
|
||||||
{/* Job Meta Information */}
|
{/* Job Meta Information */}
|
||||||
<div className="flex flex-col gap-2 text-sm">
|
<div className="flex flex-col gap-2 text-sm">
|
||||||
<div className="flex items-center gap-2 text-muted-foreground">
|
<div className="flex items-center gap-2 text-muted-foreground">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue