Reworked friend view
This commit is contained in:
1 parent
94c544b161
commit
061bed2b59
3 files changed
+8
-8
No files matched your search
@@ -8,9 +8,9 @@ type ResultStatus = "success" | "already_friends" | "error";
|
||||
|
||||
export default async function AddFriendPage({
|
||||
searchParams,
|
||||
}: {
|
||||
}: Readonly<{
|
||||
searchParams: Promise<{ id?: string }>;
|
||||
}) {
|
||||
}>) {
|
||||
const { id } = await searchParams;
|
||||
|
||||
// Validate the ID parameter
|
||||
@@ -110,10 +110,10 @@ export default async function AddFriendPage({
|
||||
function ResultCard({
|
||||
status,
|
||||
message,
|
||||
}: {
|
||||
}: Readonly<{
|
||||
status: ResultStatus;
|
||||
message: string;
|
||||
}) {
|
||||
}>) {
|
||||
const isSuccess = status === "success";
|
||||
const isAlreadyFriends = status === "already_friends";
|
||||
|
||||
|
||||
Reference in new issue
Block a user