From cf13dcc023063e12ef9012120ce7b8b960f04d1f Mon Sep 17 00:00:00 2001 From: jasmeetsohal Date: Thu, 13 May 2021 23:05:28 +0530 Subject: [PATCH] add random bullet color in list user's events --- pages/[user].tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pages/[user].tsx b/pages/[user].tsx index d1c525ea00..62499c4f42 100644 --- a/pages/[user].tsx +++ b/pages/[user].tsx @@ -8,7 +8,7 @@ export default function User(props) {
  • -
    +

    {type.title}

    {type.description}

    @@ -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