refactor: update environment configuration and enhance notification handling
- Refactored ecosystem configuration to utilize .env for sensitive variables, improving security and flexibility. - Replaced direct notification button implementation with a dedicated PlayerNotificationBell component for better code organization. - Updated various screens to integrate the new notification component and adjusted prefetch settings for links to optimize performance. - Added new translations for notifications and wallet logs to enhance user experience across multiple languages.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { Bell } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { CurrencySwitcher } from "@/components/currency-switcher";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
import { PlayerNotificationBell } from "@/components/layout/player-notification-bell";
|
||||
import { HallBettingGrid } from "@/features/hall/hall-betting-grid";
|
||||
import { useActivePlayerCurrency } from "@/hooks/use-active-player-currency";
|
||||
import { HallDrawPanel } from "@/features/hall/hall-draw-panel";
|
||||
@@ -21,7 +21,6 @@ import { cn } from "@/lib/utils";
|
||||
* 下注大厅:钱包条 §4 + 当期期号 §4.2(封盘置灰 / 倒计时错误色 / WS+轮询);玩法目录 §12.3;下注表格 §13.3。
|
||||
*/
|
||||
export function HallScreen() {
|
||||
const { t } = useTranslation("common");
|
||||
const { t: tp } = useTranslation("player");
|
||||
const drawLive = useHallDrawLive();
|
||||
const { activeCurrency } = useActivePlayerCurrency();
|
||||
@@ -69,17 +68,7 @@ export function HallScreen() {
|
||||
>
|
||||
{tp("nav.rules")}
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
playerHeaderControl,
|
||||
"relative size-8 rounded-full text-[#1d57b7] hover:bg-[#f4f7fb]",
|
||||
)}
|
||||
aria-label={t("navigation.notifications")}
|
||||
>
|
||||
<Bell className="size-4" aria-hidden />
|
||||
<span className="absolute right-1.5 top-1.5 size-1.5 rounded-full bg-[#ff143d]" />
|
||||
</button>
|
||||
<PlayerNotificationBell />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user