Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] Optimized style #31

Merged
merged 9 commits into from
Aug 23, 2023
Merged

[UI] Optimized style #31

merged 9 commits into from
Aug 23, 2023

Conversation

s7monk
Copy link
Contributor

@s7monk s7monk commented Aug 16, 2023

Purpose

Optimized style

Tests

API and Format

Documentation

}

const tooltipContent = useMemo(() => {
return i18n.language === 'zh-CN' ? '访问 GitHub 仓库' : 'Visit GitHub repository';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use I18n msg

const [tooltipContent, icon] = useMemo(() => {
let tooltipContent;
if(i18n.language === 'zh-CN') {
tooltipContent = dark ? '切换到亮色模式' : '切换到暗色模式';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use I18n msg

"cdcingestion": "CDC集成",
"system": "系统"
"system": "系统管理"
},
"playground": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chinese and English are separated by spaces.

"tableInfo": "表信息",
"details": "详细",
"files": "文件"
"catalog": "Catalog目录",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chinese and English are separated by spaces.

import {useEffect, useState} from "react";
import styles from "./catalog-tree.module.less"
import { useTranslation } from 'react-i18next';
import { useCatalogStore } from "@src/store/catalogStore.ts";

const CatalogTree = () => {
const { t } = useTranslation()
const [hoveredNode, setHoveredNode] = useState(null);
const [hoveredIcon, setHoveredIcon] = useState(false); // 新增一个状态来追踪图标的悬停状态
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use usestate ,please use style

s7monk added 7 commits August 18, 2023 18:52
# Conflicts:
#	paimon-web-server/src/main/resources/i18n/messages_zh_CN.properties
#	paimon-web-ui/src/api/endpoints.ts
@yuzelin yuzelin merged commit cf48e27 into apache:main Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants