fix: use correct space gradient in settings overview panel
Space icon in Settings → Overview was using the user Avatar component (wrong palette + hashed on name), now uses getSpaceGradient(id, name) to match the sidebar.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useRef, useEffect } from 'react';
|
import React, { useState, useRef, useEffect } from 'react';
|
||||||
import { ImageCropModal } from '../../ui/ImageCropModal';
|
import { ImageCropModal } from '../../ui/ImageCropModal';
|
||||||
import { Avatar } from '../../ui/Avatar';
|
import { getSpaceGradient } from '../../../utils/gradients';
|
||||||
import { useSpaceStore } from '../../../stores/spaceStore';
|
import { useSpaceStore } from '../../../stores/spaceStore';
|
||||||
import { useAuthStore } from '../../../stores/authStore';
|
import { useAuthStore } from '../../../stores/authStore';
|
||||||
import { useUIStore } from '../../../stores/uiStore';
|
import { useUIStore } from '../../../stores/uiStore';
|
||||||
@@ -256,7 +256,12 @@ export function OverviewPanel({ spaceId }: OverviewPanelProps) {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Avatar name={displayIconName} size={64} />
|
<div
|
||||||
|
className="w-full h-full rounded-full flex items-center justify-center text-white text-xl font-bold"
|
||||||
|
style={{ background: getSpaceGradient(space.id, space.name).gradient }}
|
||||||
|
>
|
||||||
|
{space.name.charAt(0).toUpperCase()}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{uploadingIcon && (
|
{uploadingIcon && (
|
||||||
<div className="absolute inset-0 bg-black/50 flex items-center justify-center">
|
<div className="absolute inset-0 bg-black/50 flex items-center justify-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user