wip: network

This commit is contained in:
Ren Amamiya
2023-08-06 07:59:43 +07:00
parent 373a0f0608
commit 71338b3b07
49 changed files with 465 additions and 424 deletions

View File

@@ -23,7 +23,7 @@ export function ChatsListItem({ data }: { data: Chats }) {
return (
<NavLink
to={`/app/chats/${data.sender_pubkey}`}
to={`/chats/${data.sender_pubkey}`}
preventScrollReset={true}
className={({ isActive }) =>
twMerge(

View File

@@ -14,11 +14,9 @@ export function NewMessageModal() {
const [open, setOpen] = useState(false);
const { status, account } = useAccount();
const follows = account ? JSON.parse(account.follows as string) : [];
const openChat = (pubkey: string) => {
setOpen(false);
navigate(`/app/chats/${pubkey}`);
navigate(`/chats/${pubkey}`);
};
return (
@@ -61,7 +59,7 @@ export function NewMessageModal() {
<LoaderIcon className="h-5 w-5 animate-spin text-white" />
</div>
) : (
follows.map((follow) => (
account?.follows?.map((follow) => (
<div
key={follow}
className="group flex items-center justify-between px-4 py-2 hover:bg-white/10"

View File

@@ -24,7 +24,7 @@ export function ChatsListSelfItem({ data }: { data: { pubkey: string } }) {
return (
<NavLink
to={`/app/chats/${data.pubkey}`}
to={`/chats/${data.pubkey}`}
preventScrollReset={true}
className={({ isActive }) =>
twMerge(

View File

@@ -33,7 +33,7 @@ export function ChatSidebar({ pubkey }: { pubkey: string }) {
<div>
<p className="leading-tight">{user?.bio || user?.about}</p>
<Link
to={`/app/users/${pubkey}`}
to={`/users/${pubkey}`}
className="mt-3 inline-flex h-10 w-full items-center justify-center rounded-md bg-white/10 text-sm font-medium text-white hover:bg-fuchsia-500"
>
View full profile

View File

@@ -15,7 +15,7 @@ export function UnknownsModal({ data }: { data: Chats[] }) {
const openChat = (pubkey: string) => {
setOpen(false);
navigate(`/app/chats/${pubkey}`);
navigate(`/chats/${pubkey}`);
};
return (