fix(auth): unify scheme creator display
This commit is contained in:
@@ -37,6 +37,7 @@ import VectorSource from "ol/source/Vector";
|
||||
import { Style, Icon, Circle, Fill, Stroke } from "ol/style";
|
||||
import Feature, { FeatureLike } from "ol/Feature";
|
||||
import { bbox, featureCollection } from "@turf/turf";
|
||||
import { useSchemeCreatorName } from "@components/olmap/core/useSchemeCreatorName";
|
||||
|
||||
interface SchemeRecord {
|
||||
id: number;
|
||||
@@ -96,6 +97,7 @@ const SchemeQuery: React.FC<SchemeQueryProps> = ({
|
||||
const { queryAll, queryDate, expandedId } = queryState;
|
||||
const [internalSchemes, setInternalSchemes] = useState<SchemeRecord[]>([]);
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const creatorName = useSchemeCreatorName();
|
||||
|
||||
const { open } = useNotification();
|
||||
const map = useMap();
|
||||
@@ -399,8 +401,9 @@ const SchemeQuery: React.FC<SchemeQueryProps> = ({
|
||||
variant="caption"
|
||||
className="text-gray-500 block"
|
||||
>
|
||||
最小半径: {scheme.minDiameter} · 用户: {scheme.user} ·
|
||||
日期: {formatShortDate(scheme.create_time)}
|
||||
最小半径: {scheme.minDiameter} · 用户:{" "}
|
||||
{creatorName(scheme.user)} · 日期:{" "}
|
||||
{formatShortDate(scheme.create_time)}
|
||||
</Typography>
|
||||
</Box>
|
||||
{/* 操作按钮 */}
|
||||
@@ -490,7 +493,7 @@ const SchemeQuery: React.FC<SchemeQueryProps> = ({
|
||||
variant="caption"
|
||||
className="font-medium text-gray-900"
|
||||
>
|
||||
{scheme.user}
|
||||
{creatorName(scheme.user)}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box className="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user