Commit 62d7cb6a by Arjun Jhukal

updated the getInitials to get initial of user name if first_name and last name doesnt exist

parent f8202c1e
......@@ -140,6 +140,8 @@ export default function TableHeader({
)}
{/* <Filter /> */}
{customRange ? (
<>
<Button
startIcon={!downMD && <ArrowDown size={16} />}
onClick={() => setShowCustomRangeModal(true)}
......@@ -179,6 +181,7 @@ export default function TableHeader({
/>
</DialogContent>
</Dialog>
</>) : ""}
{/* Download Button */}
{onDownloadCSV && <Button
......
......@@ -26,7 +26,7 @@ export default function LatestRegisteredPlayer() {
header: "Name",
cell: ({ row }) => {
const { first_name, last_name, name } = row.original;
const initials = getInitials(first_name, last_name);
const initials = getInitials(first_name, last_name) || getInitials(row.original.name);
return (
<Box className="flex justify-start items-center gap-2">
......
......@@ -89,7 +89,7 @@ export default function PlayerListing() {
header: "Name",
cell: ({ row }) => {
const { first_name, last_name, name } = row.original;
const initials = getInitials(first_name, last_name);
const initials = getInitials(first_name, last_name) || getInitials(row.original.name);
return (
<Box className="flex justify-start items-center gap-2">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment