Executando verificação de segurança...
1
const AdminProfileFactory = (): AbstractProfileFactory => ({
  createProfile: () => ({
    style: "profile-admin",
    type: "ADMIN",
    goToProfile: () => location.assign("/perfil/admin"),
  }),
});

const BuyerProfileFactory = (): AbstractProfileFactory => ({
  createProfile: () => ({
    style: "profile-buyer",
    type: "BUYER",
    goToProfile: () => location.assign("/perfil/buyer"),
  }),
});

const SellerProfileFactory = (): AbstractProfileFactory => ({
  createProfile: () => ({
    style: "profile-seller",
    type: "SELLER",
    goToProfile: () => location.assign("/perfil/seller"),
  }),
});```

Isso me pareceu muita repetição de código, no mínimo muito verboso.
Carregando publicação patrocinada...