change types, display userid if login isnt returned

This commit is contained in:
Kristina Durivage
2024-06-24 13:45:12 -05:00
parent 7eef9091bc
commit 6acff02fbf
4 changed files with 4 additions and 3 deletions
@@ -12,7 +12,7 @@ export function AddedByCell(props: AddedByCellProps) {
return (
<div>
<span className={styles.otherText}>{props.user?.login || 'Unknown'}</span>
<span className={styles.otherText}>{props.user?.login || `UserId: ${props.user?.userId}` || 'Unknown'}</span>
</div>
);
}
@@ -9,4 +9,5 @@ export type QueryTemplateRow = {
datasourceType?: string;
createdAtTimestamp?: number;
user?: User;
uid?: string;
};
@@ -12,7 +12,7 @@ export const parseCreatedByValue = (value?: string) => {
return undefined;
} else {
return {
userId: Number(vals[1]),
userId: vals[1],
login: vals[2],
};
}
@@ -27,7 +27,7 @@ export type DataQuerySpecResponse = {
};
export type User = {
userId?: number;
userId?: string;
login?: string;
};