Skip to content
Snippets Groups Projects
Unverified Commit d5714811 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Use a different icon for tables on the homepage (#22445)

parent 75b2977d
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,8 @@ export const getName = item => { ...@@ -13,7 +13,8 @@ export const getName = item => {
export const getIcon = item => { export const getIcon = item => {
const entity = getEntity(item); const entity = getEntity(item);
return entity.objectSelectors.getIcon(item.model_object); const options = { variant: "secondary" };
return entity.objectSelectors.getIcon(item.model_object, options);
}; };
const PopularItems = createEntity({ const PopularItems = createEntity({
......
...@@ -13,7 +13,8 @@ export const getName = item => { ...@@ -13,7 +13,8 @@ export const getName = item => {
export const getIcon = item => { export const getIcon = item => {
const entity = getEntity(item); const entity = getEntity(item);
return entity.objectSelectors.getIcon(item.model_object); const options = { variant: "secondary" };
return entity.objectSelectors.getIcon(item.model_object, options);
}; };
const RecentItems = createEntity({ const RecentItems = createEntity({
......
...@@ -228,7 +228,9 @@ const Tables = createEntity({ ...@@ -228,7 +228,9 @@ const Tables = createEntity({
objectSelectors: { objectSelectors: {
getUrl: table => getUrl: table =>
Urls.tableRowsQuery(table.database_id, table.table_id, null), Urls.tableRowsQuery(table.database_id, table.table_id, null),
getIcon: table => ({ name: "table" }), getIcon: (table, { variant = "primary" } = {}) => ({
name: variant === "primary" ? "table" : "database",
}),
getColor: table => color("accent2"), getColor: table => color("accent2"),
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment