-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notification for refund and blocked duplicate refund vote (#261)
* first refund vote sync and fetching balance after 10 seconds * dummy push * notification for refund * added missing migration file * new notification type added * block duplicate refund vote and notification fix * quick fix
- Loading branch information
Showing
12 changed files
with
158 additions
and
16 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
36 changes: 36 additions & 0 deletions
36
src/components/NotificationsModal/notificationComponents/RefundNotification.tsx
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,36 @@ | ||
import Image from 'next/image'; | ||
import { useRouter } from 'next/router'; | ||
|
||
export default function RefundNotification(activity: any) { | ||
const router = useRouter(); | ||
const handleClick = (e: any) => { | ||
if (e.target.id === 'user') { | ||
router.push(`/profile/${activity.data.sender.username}`); | ||
} else router.push(`/projects/${activity.data.briefId}`); | ||
}; | ||
|
||
return ( | ||
<div | ||
onClick={handleClick} | ||
className='flex hover:bg-imbue-light-purple-three cursor-pointer py-2 border-t border-b px-5' | ||
> | ||
<div className='w-9 flex flex-shrink-0 h-9 mr-3'> | ||
<Image | ||
className='rounded-full w-9 h-9 object-cover' | ||
src={activity.data?.sender?.profile_photo || '/profile-image.png'} | ||
height={20} | ||
width={30} | ||
alt='user' | ||
/> | ||
</div> | ||
<div className='text-left'> | ||
<p className='text-base font-semibold'> | ||
{activity.data.title || 'You have a notification'} | ||
</p> | ||
<p className='text-sm mt-3'> | ||
<p dangerouslySetInnerHTML={{ __html: activity.data.text }} ></p> | ||
</p> | ||
</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
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,20 @@ | ||
import { Knex } from 'knex'; | ||
|
||
|
||
export async function up(knex: Knex): Promise<void> { | ||
await knex.schema.createTable('reviews', (builder) => { | ||
builder.increments('id', { primaryKey: true }); | ||
builder.timestamps(true, true); | ||
builder.integer('freelancer_id'); | ||
builder.integer('ratings'); | ||
builder.text('title'); | ||
builder.text('description'); | ||
builder.integer('user_id'); | ||
builder.foreign('user_id').references('users.id'); | ||
builder.foreign('freelancer_id').references('freelancers.id'); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
await knex.schema.dropTableIfExists('reviews'); | ||
} |
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