Scheduling infrastructure for absolutely everyone.
add random bullet color in list user's events
jasmeetsohalcf13dcc02306
diff --git a/pages/[user].tsx b/pages/[user].tsxindex d1c525ea00c..62499c4f42b 100644--- a/pages/[user].tsx+++ b/pages/[user].tsx@@ -8,7 +8,7 @@ export default function User(props) {<li key={type.id}><Link href={'/' + props.user.username + '/' + type.slug}><a className="block px-6 py-4">- <div className="inline-block w-3 h-3 rounded-full bg-blue-600 mr-2"></div>+ <div className="inline-block w-3 h-3 rounded-full mr-2" style={{backgroundColor:getRandomColorCode()}}></div><h2 className="inline-block font-medium">{type.title}</h2><p className="inline-block text-gray-400 ml-2">{type.description}</p></a>@@ -79,4 +79,14 @@ export async function getServerSideProps(context) {eventTypes},}-}\ No newline at end of file+}++// Auxiliary methods++export function getRandomColorCode() {+ let color = '#';+ for (let idx = 0; idx < 6; idx++) {+ color += Math.floor(Math.random() * 10);+ }+ return color;+}\ No newline at end of file