mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
Feat: add user header with follow info
This commit is contained in:
@@ -24,20 +24,15 @@ const createNewUserFollows = async ({
|
||||
const randomUsers = users
|
||||
.filter((randomUser) => randomUser.id !== user.id)
|
||||
.sort(() => Math.random() - Math.random())
|
||||
.slice(0, 20);
|
||||
.slice(0, 100);
|
||||
|
||||
// Get the user to follow the random users, and the random users to follow the user.
|
||||
// Get the user to follow the random users
|
||||
const data = randomUsers.flatMap((randomUser) => [
|
||||
{
|
||||
followerId: user.id,
|
||||
followingId: randomUser.id,
|
||||
followedAt: faker.date.between({ from: user.createdAt, to: new Date() }),
|
||||
},
|
||||
{
|
||||
followerId: randomUser.id,
|
||||
followingId: user.id,
|
||||
followedAt: faker.date.between({ from: randomUser.createdAt, to: new Date() }),
|
||||
},
|
||||
]);
|
||||
|
||||
userFollows.push(...data);
|
||||
|
||||
Reference in New Issue
Block a user