Skip to content

fix: data display for volunteers#43

Merged
Nliver merged 1 commit intokaiyuanshe:mainfrom
Nliver:feat-update-info
Jan 13, 2026
Merged

fix: data display for volunteers#43
Nliver merged 1 commit intokaiyuanshe:mainfrom
Nliver:feat-update-info

Conversation

@Nliver
Copy link
Copy Markdown
Collaborator

@Nliver Nliver commented Jan 13, 2026

fix: data display for annual outstanding volunteers and COSCon stars

annual outstanding volunteers and COSCon stars
@Nliver Nliver self-assigned this Jan 13, 2026
@Nliver Nliver added bug Something isn't working documentation Improvements or additions to documentation labels Jan 13, 2026
@Nliver Nliver requested a review from Copilot January 13, 2026 15:28
@Nliver Nliver merged commit 6b2f0a2 into kaiyuanshe:main Jan 13, 2026
7 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request aims to fix data display issues for annual outstanding volunteers and COSCon stars by updating default selected years and adding new volunteer data for 2025.

Changes:

  • Updated default selected year from '2023' to '2025' in COSCon stars and cooperation pages
  • Added 12 new volunteer entries with 2025 award dates
  • Added 2025 cooperation stars data to the yearly array

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/pages/community/coscon/index.tsx Updated default selected year to '2025' to display most recent COSCon stars
src/pages/community/cooperation/index.tsx Updated default year to '2025' and added 2025 cooperation stars to yearlyStars array
src/data/volunteers.ts Added 12 new annual outstanding volunteer entries for 2025

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


export default function CooperationPage() {
const [selectedYear, setSelectedYear] = useState('2023')
const [selectedYear, setSelectedYear] = useState('2025')
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The selectedYear is initialized to '2025', but due to the bug in line 108 where year '2025' data is incorrectly labeled as '2023', this year won't exist in uniqueYears and the selectedStars fallback logic will incorrectly default to cooperationStars2023 instead of showing the 2025 data. This needs to be coordinated with fixing line 108.

Copilot uses AI. Check for mistakes.
]

const yearlyStars = [
{ year: '2023', stars: cooperationStars2025 },
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

There are now two entries in the yearlyStars array with year '2023'. Line 108 should have year '2025' to avoid duplicate year entries. This will cause issues with year selection logic since uniqueYears will contain duplicate '2023' entries and year '2025' will not be selectable despite having data.

Suggested change
{ year: '2023', stars: cooperationStars2025 },
{ year: '2025', stars: cooperationStars2025 },

Copilot uses AI. Check for mistakes.
Comment thread src/data/volunteers.ts
Comment on lines +13 to +105
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '丁欣',
nickname: '小丁',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '刘天栋',
nickname: 'Ted',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '刘智杰',
nickname: '小符',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '廖敬仪',
nickname: '',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '李佳欣',
nickname: '',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '李思颖',
nickname: 'Mable',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '李楠',
nickname: '楠楠',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '段延星',
nickname: '',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '王勇杰',
nickname: '大黄',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '臧鹏',
nickname: '大鹏',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
{
name: '赵文涵',
nickname: '文涵',
avatar: '/img//cblecker.png',
awardDate: '2025-12-06',
recommendation:
'年度优秀志愿者'
},
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

All new volunteer entries have double slashes in the avatar path '/img//cblecker.png'. This should be '/img/cblecker.png' with a single slash to match the pattern used in existing volunteer entries.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants