import React from "react"; import namor from "namor"; import "./index.css"; const range = len => { const arr = []; for (let i = 0; i < len; i++) { arr.push(i); } return arr; }; const newPerson = () => { const statusChance = Math.random(); return { firstName: namor.generate({ words: 1, numbers: 0 }), lastName: namor.generate({ words: 1, numbers: 0 }), age: Math.floor(Math.random() * 30), visits: Math.floor(Math.random() * 100), progress: Math.floor(Math.random() * 100), status: statusChance > 0.66 ? "relationship" : statusChance > 0.33 ? "complicated" : "single" }; }; export function makeData(len = 5553) { return range(len).map(d => { return { ...newPerson(), children: range(10).map(newPerson) }; }); } export const Logo = () =>
For more examples, visit {''}
; export const Tips = () =>
Tip: Hold shift when sorting to multi-sort!
;