recentUsersMocks.ts 568 B

123456789101112131415161718192021
  1. import { UserViewDTO } from '../api';
  2. export const getMockRecentUsers = (): UserViewDTO[] => {
  3. const recentUsers = [];
  4. for (let i = 1; i <= 10; i++) {
  5. recentUsers.push({
  6. user: {
  7. id: i,
  8. name: `User ${i}`,
  9. avatarUrl: '/avatar/c84258e9c39059a89ab77d846ddab909',
  10. login: `user${i}`,
  11. email: i % 2 === 0 ? `user${i}@localhost.com` : undefined,
  12. hasCustomAvatar: i % 2 === 0,
  13. },
  14. viewed: new Date(new Date().setDate(new Date().getDate() - (i + 1))).toISOString(),
  15. });
  16. }
  17. return recentUsers;
  18. };