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

Feature/sample dashboard page #55

Merged
merged 16 commits into from
Oct 5, 2024
Merged

Conversation

Auroraphile
Copy link
Collaborator

No description provided.

Copy link
Collaborator

Choose a reason for hiding this comment

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

一般很少自己用table标签写,应该是用shadcn本身的table组件库写.但是目前先这样吧

const avatarColor = new AvatarColor();

const Avatar: React.FC<AvatarProps> = ({ userId, userName, totalUsers }) => {
const isWithinColorLimit = userId < 16; //
Copy link
Collaborator

Choose a reason for hiding this comment

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

为什么是用id判断?这个之后估计得改. 应该是外部的一个全局状态存储了candidate的list,然后那个list size比16大,然后触发超出16个的逻辑.这部分下个sprint写也行

const candidate = candidateList.find((candidate) => candidate.id === userId);
const backgroundColor = candidate ? candidate.color : "#CCCCCC";

const styles: React.CSSProperties = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

可以让gpt改tailiwind的写法写,保证统一,这个我之后来改吧

const AssertionTable: React.FC<AssertionTableProps> = ({ assertions }) => {
return (
<div>
<table className="min-w-full table-auto">
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里也是不用自己写table的问题,但是不改也行了,就先这样吧


<p className="text-sm text-gray-500 text-center mt-4">
By sharing your files or using our service, you agree to our{" "}
<a href="#" className="text-blue-500">
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里用a标签是? 应该用next的link标签,另外, 这里href是怎么回事?没有实际路径

</p>
<p className="text-center mt-4 text-gray-500">
Need help? Click{" "}
<Link href="#" className="text-blue-500 hover:underline">
Copy link
Collaborator

Choose a reason for hiding this comment

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

href?

@@ -96,7 +96,7 @@ const Uploader: React.FC<UploaderProps> = ({ className }) => {
your files
</p>
<p className="text-gray-400 mb-2">or</p>
<a href="#" className="text-blue-600">
<a href="/sample" className="text-blue-600">
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里也应该使用next的link

.
</p>
<p className="text-center mt-4 text-gray-500">
Need help? Click{" "}
Copy link
Collaborator

Choose a reason for hiding this comment

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

href

const Upload: React.FC = () => {
useEffect(() => {
const fetchData = async () => {
try {
Copy link
Collaborator

Choose a reason for hiding this comment

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

现在这里useEffect的东西应该没用了


<p className="text-sm text-gray-500 text-center mt-4">
By sharing your files or using our service, you agree to our{" "}
<a href="#" className="text-blue-500">
Copy link
Collaborator

Choose a reason for hiding this comment

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

附近的a和标签的href要改

@Mirrorgo Mirrorgo merged commit 4dc2ba6 into release Oct 5, 2024
1 check passed
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.

4 participants