Skip to content

Commit

Permalink
Fix the alt prop of <AllStudentsIcon/>
Browse files Browse the repository at this point in the history
  • Loading branch information
Slouchwind committed Apr 17, 2023
1 parent 892fa31 commit 62165ee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
7 changes: 6 additions & 1 deletion components/student.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ItemStyles from '@/styles/Item.module.scss';
import Image from 'next/image';
import { studentsJson } from './students/students';
import { getStudentInfo } from './students/infoStudents';
import ItemStyles from '@/styles/Item.module.scss';

interface StudentProps {
id: number,
Expand Down Expand Up @@ -29,4 +30,8 @@ export default function Student({ id, allInfo, onClick, select, onError }: Stude
<div className={ItemStyles.line} />
</div>
);
}

export function AllStudentsIcon() {
return (<Image src='/api/icon/line?fill=63adc6' alt='All Students Icon' />);
}
9 changes: 5 additions & 4 deletions pages/chat.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//Components
import Image from 'next/image';
import { NextSeo } from 'next-seo';
import MainNode from '@/components/main';
import Student from '@/components/student';
import Student, { AllStudentsIcon } from '@/components/student';

//Styles
import ItemStyles from '@/styles/Item.module.scss';
Expand All @@ -27,7 +28,7 @@ function Content({ id, allInfo }: ContentProps) {
return (
<div id={ItemStyles.content}>
<div className={ItemStyles.img}>
<img
<Image
className={ItemStyles.col}
src={`https://schale.gg/images/student/collection/${info.schale?.CollectionTexture}.webp`}
alt={`${info.schale?.Name} collection image`}
Expand All @@ -38,7 +39,7 @@ function Content({ id, allInfo }: ContentProps) {
<p className={ItemStyles.info}>{info.file?.info}</p>
</div>
<div className={ItemStyles.birthday}>
<img
<Image
src='/api/icon/birth?fill=5f7c8c'
alt={`${info.schale?.Name} birthday icon`}
/>
Expand Down Expand Up @@ -171,7 +172,7 @@ export default function Info() {
</div>
<div style={{ height: 70 }} />
<div id={ItemStyles.all}>
<img src='/api/icon/line?fill=63adc6' />
<AllStudentsIcon/>
<p>所有学生</p>
</div>
<div id={ItemStyles.students}>
Expand Down
9 changes: 5 additions & 4 deletions pages/info.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//Components
import Image from 'next/image';
import { NextSeo } from 'next-seo';
import MainNode from '@/components/main';
import Student from '@/components/student';
import Student, { AllStudentsIcon } from '@/components/student';

//Styles
import styles from '@/styles/Item.module.scss';
Expand All @@ -23,7 +24,7 @@ function Content({ id, allInfo }: ContentProps) {
return (
<div id={styles.content}>
<div className={styles.img}>
<img
<Image
className={styles.col}
src={`https://schale.gg/images/student/collection/${info.schale?.CollectionTexture}.webp`}
alt={`${info.schale?.Name} collection image`}
Expand All @@ -34,7 +35,7 @@ function Content({ id, allInfo }: ContentProps) {
<p className={styles.info}>{info.file?.info}</p>
</div>
<div className={styles.birthday}>
<img
<Image
src='/api/icon/birth?fill=5f7c8c'
alt={`${info.schale?.Name} birthday icon`}
/>
Expand Down Expand Up @@ -70,7 +71,7 @@ export default function Info() {
</div>
<div style={{ height: 70 }} />
<div id={styles.all}>
<img src='/api/icon/line?fill=63adc6' />
<AllStudentsIcon/>
<p>所有学生</p>
</div>
<div id={styles.students}>
Expand Down

1 comment on commit 62165ee

@vercel
Copy link

@vercel vercel bot commented on 62165ee Apr 17, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.