revert route groups due to nextjs bug, fix build
This commit is contained in:
@@ -3,7 +3,7 @@ import { ImageWithFallback } from '@components/imageWithFallback';
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
import { useProfileMetadata } from '@utils/hooks/useProfileMetadata';
|
||||
import { truncate } from '@utils/truncate';
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
import { memo } from 'react';
|
||||
|
||||
@@ -24,7 +24,7 @@ export const UserBase = memo(function UserBase({ pubkey }: { pubkey: string }) {
|
||||
<span className="truncate font-medium leading-tight text-zinc-200">
|
||||
{profile?.display_name || profile?.name}
|
||||
</span>
|
||||
<span className="text-sm leading-tight text-zinc-400">{truncate(pubkey, 16, ' .... ')}</span>
|
||||
<span className="text-sm leading-tight text-zinc-400">{shortenKey(pubkey)}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ImageWithFallback } from '@components/imageWithFallback';
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
import { useProfileMetadata } from '@utils/hooks/useProfileMetadata';
|
||||
import { truncate } from '@utils/truncate';
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
export const UserFollow = ({ pubkey }: { pubkey: string }) => {
|
||||
const profile = useProfileMetadata(pubkey);
|
||||
@@ -22,7 +22,7 @@ export const UserFollow = ({ pubkey }: { pubkey: string }) => {
|
||||
<span className="truncate font-medium leading-tight text-zinc-200">
|
||||
{profile?.display_name || profile?.name}
|
||||
</span>
|
||||
<span className="text-sm leading-tight text-zinc-400">{truncate(pubkey, 16, ' .... ')}</span>
|
||||
<span className="text-sm leading-tight text-zinc-400">{shortenKey(pubkey)}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ImageWithFallback } from '@components/imageWithFallback';
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
import { useProfileMetadata } from '@utils/hooks/useProfileMetadata';
|
||||
import { truncate } from '@utils/truncate';
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
@@ -28,10 +28,10 @@ export const UserLarge = ({ pubkey, time }: { pubkey: string; time: number }) =>
|
||||
<div className="flex w-full justify-between">
|
||||
<div className="flex flex-col gap-1 text-sm">
|
||||
<span className="font-bold leading-tight text-zinc-100">
|
||||
{profile?.display_name || profile?.name || truncate(pubkey, 16, ' .... ')}
|
||||
{profile?.display_name || profile?.name || shortenKey(pubkey)}
|
||||
</span>
|
||||
<span className="leading-tight text-zinc-400">
|
||||
{profile?.username || truncate(pubkey, 16, ' .... ')} · {dayjs().to(dayjs.unix(time))}
|
||||
{profile?.username || shortenKey(pubkey)} · {dayjs().to(dayjs.unix(time))}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { useProfileMetadata } from '@utils/hooks/useProfileMetadata';
|
||||
import { truncate } from '@utils/truncate';
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
export const UserMention = ({ pubkey }: { pubkey: string }) => {
|
||||
const profile = useProfileMetadata(pubkey);
|
||||
return (
|
||||
<span className="cursor-pointer text-fuchsia-500">
|
||||
@{profile?.name || profile?.username || truncate(pubkey, 16, ' .... ')}
|
||||
</span>
|
||||
<span className="cursor-pointer text-fuchsia-500">@{profile?.name || profile?.username || shortenKey(pubkey)}</span>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ImageWithFallback } from '@components/imageWithFallback';
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
import { useProfileMetadata } from '@utils/hooks/useProfileMetadata';
|
||||
import { truncate } from '@utils/truncate';
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
export const UserMini = ({ pubkey }: { pubkey: string }) => {
|
||||
const profile = useProfileMetadata(pubkey);
|
||||
@@ -19,7 +19,7 @@ export const UserMini = ({ pubkey }: { pubkey: string }) => {
|
||||
/>
|
||||
</div>
|
||||
<span className="text-xs font-medium leading-none text-zinc-500">
|
||||
Replying to {profile?.name || truncate(pubkey, 16, ' .... ')}
|
||||
Replying to {profile?.name || shortenKey(pubkey)}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ImageWithFallback } from '@components/imageWithFallback';
|
||||
import { DEFAULT_AVATAR } from '@stores/constants';
|
||||
|
||||
import { useProfileMetadata } from '@utils/hooks/useProfileMetadata';
|
||||
import { truncate } from '@utils/truncate';
|
||||
import { shortenKey } from '@utils/shortenKey';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
@@ -25,7 +25,7 @@ export const UserQuoteRepost = ({ pubkey, time }: { pubkey: string; time: number
|
||||
</div>
|
||||
<div className="flex items-baseline gap-2 text-sm">
|
||||
<h5 className="font-bold leading-tight group-hover:underline">
|
||||
{profile?.display_name || profile?.name || truncate(pubkey, 16, ' .... ')} reposted
|
||||
{profile?.display_name || profile?.name || shortenKey(pubkey)} reposted
|
||||
</h5>
|
||||
<span className="leading-tight text-zinc-500">·</span>
|
||||
<span className="text-zinc-500">{dayjs().to(dayjs.unix(time))}</span>
|
||||
|
||||
Reference in New Issue
Block a user