revert route groups due to nextjs bug, fix build

This commit is contained in:
Ren Amamiya
2023-04-18 07:55:11 +07:00
parent 2b0a4e2402
commit fc258fdcde
38 changed files with 89 additions and 92 deletions

View File

@@ -4,14 +4,14 @@ 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 ChatListItem = ({ pubkey }: { pubkey: string }) => {
const profile = useProfileMetadata(pubkey);
return (
<ActiveLink
href={`/chats/${pubkey}`}
href={`/nostr/chats/${pubkey}`}
activeClassName="dark:bg-zinc-900 dark:text-zinc-100 hover:dark:bg-zinc-800"
className="inline-flex items-center gap-2 rounded-md px-2.5 py-1.5 hover:bg-zinc-900"
>
@@ -25,7 +25,7 @@ export const ChatListItem = ({ pubkey }: { pubkey: string }) => {
</div>
<div>
<h5 className="text-sm font-medium text-zinc-400">
{profile?.display_name || profile?.name || truncate(pubkey, 16, ' .... ')}
{profile?.display_name || profile?.name || shortenKey(pubkey)}
</h5>
</div>
</ActiveLink>