feat: notifications link to relevant pages when available.
This commit is contained in:
parent
75abbb3d51
commit
3081adc945
12 changed files with 59 additions and 12 deletions
|
|
@ -354,6 +354,7 @@ export async function POST({ params, request }) {
|
|||
'RUG_PULL',
|
||||
'Coin rugpulled!',
|
||||
`A coin you owned, ${coinData.name} (*${normalizedSymbol}), crashed ${Math.abs(priceImpact).toFixed(1)}%!`,
|
||||
`/coin/${normalizedSymbol}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export const GET: RequestHandler = async ({ url, request }) => {
|
|||
type: notifications.type,
|
||||
title: notifications.title,
|
||||
message: notifications.message,
|
||||
link: notifications.link,
|
||||
isRead: notifications.isRead,
|
||||
createdAt: notifications.createdAt,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export const POST: RequestHandler = async ({ request, locals }) => {
|
|||
userId: userId,
|
||||
type: 'SYSTEM',
|
||||
title: `${prestigeName} Achieved!`,
|
||||
message: `Congratulations! You have successfully reached ${prestigeName}. Your portfolio has been reset, daily reward cooldown has been cleared, and you can now start fresh with your new prestige badge and enhanced daily rewards.`,
|
||||
message: `Congratulations! You have successfully reached ${prestigeName}. Your portfolio has been reset, daily reward cooldown has been cleared, and you can now start fresh with your new prestige badge and enhanced daily rewards.`
|
||||
});
|
||||
|
||||
return json({
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ export const POST: RequestHandler = async ({ request }) => {
|
|||
'TRANSFER',
|
||||
'Money received!',
|
||||
`You received ${formatValue(amount)} from @${senderData.username}`,
|
||||
`/user/${senderData.id}`
|
||||
);
|
||||
})();
|
||||
|
||||
|
|
@ -264,6 +265,7 @@ export const POST: RequestHandler = async ({ request }) => {
|
|||
'TRANSFER',
|
||||
'Coins received!',
|
||||
`You received ${amount.toFixed(6)} *${coinData.symbol} from @${senderData.username}`,
|
||||
`/coin/${normalizedSymbol}`
|
||||
);
|
||||
})();
|
||||
|
||||
|
|
|
|||
Reference in a new issue