feat: event timezone clarity and marketplace retry
This commit is contained in:
parent
ca1e5a25dc
commit
c09f1ff23d
2 changed files with 6 additions and 1 deletions
|
|
@ -79,6 +79,7 @@ function EventDetailSkeleton() {
|
||||||
|
|
||||||
export default function EventDetailPage() {
|
export default function EventDetailPage() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const timeZone = typeof Intl !== 'undefined' ? Intl.DateTimeFormat().resolvedOptions().timeZone : '';
|
||||||
const { pubkey, identifier } = useParams<{ pubkey: string; identifier: string }>();
|
const { pubkey, identifier } = useParams<{ pubkey: string; identifier: string }>();
|
||||||
const { data: event, isLoading, error, refetch } = useSkateEvent(identifier || '', pubkey);
|
const { data: event, isLoading, error, refetch } = useSkateEvent(identifier || '', pubkey);
|
||||||
const author = useAuthor(event?.pubkey);
|
const author = useAuthor(event?.pubkey);
|
||||||
|
|
@ -456,6 +457,7 @@ export default function EventDetailPage() {
|
||||||
{formatTime(event.start)}
|
{formatTime(event.start)}
|
||||||
{event.end && ` – ${formatTime(event.end)}`}
|
{event.end && ` – ${formatTime(event.end)}`}
|
||||||
</p>
|
</p>
|
||||||
|
{timeZone && <p className="truncate text-[10px] text-gray-500">{timeZone}</p>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-3 p-4">
|
<div className="flex items-center gap-3 p-4">
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export default function GearSwapPage() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const { user } = useCurrentUser();
|
const { user } = useCurrentUser();
|
||||||
const { data: items, isLoading, error } = useMarketplaceItems(200);
|
const { data: items, isLoading, error, refetch } = useMarketplaceItems(200);
|
||||||
const { data: followList } = useFollowList(user?.pubkey);
|
const { data: followList } = useFollowList(user?.pubkey);
|
||||||
|
|
||||||
// Filter state
|
// Filter state
|
||||||
|
|
@ -521,6 +521,9 @@ export default function GearSwapPage() {
|
||||||
<AlertCircle className="h-12 w-12 mx-auto mb-4 text-red-400" />
|
<AlertCircle className="h-12 w-12 mx-auto mb-4 text-red-400" />
|
||||||
<h3 className="text-lg font-bold text-red-400 mb-2">{t('marketUi.gearSwap.loadFailed')}</h3>
|
<h3 className="text-lg font-bold text-red-400 mb-2">{t('marketUi.gearSwap.loadFailed')}</h3>
|
||||||
<p className="text-gray-400">{t('marketUi.gearSwap.tryLater')}</p>
|
<p className="text-gray-400">{t('marketUi.gearSwap.tryLater')}</p>
|
||||||
|
<Button variant="outline" className="mt-4" onClick={() => void refetch()}>
|
||||||
|
{t('common.tryAgain')}
|
||||||
|
</Button>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue