Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
snowmancc committed Aug 13, 2023
1 parent d8674fb commit 483c9e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/frontend/js/components/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ const Login = () => {

// 更換圖片
let currntImgIndex = 0
console.log('currntImgIndex F:', currntImgIndex)
console.log('currntImgIndex A: ' + currntImgIndex)
const [portrait, setPortrait] = useState('Portrait0')
const changeImage = () => {
if (currntImgIndex < 2) {
currntImgIndex++
} else {
console.log('currntImgIndex B: ' + currntImgIndex)
currntImgIndex++
console.log('currntImgIndex C: ' + currntImgIndex)
if (currntImgIndex === 2) {
currntImgIndex = 0
}
console.log('currntImgIndex D: ' + currntImgIndex)
setPortrait('Portrait' + currntImgIndex)
console.log('currntImgIndex S:', currntImgIndex)
}

// 輸入名子
Expand Down

0 comments on commit 483c9e1

Please sign in to comment.