<template>
  <router-link to="/userCenter" class="header-inner">
    <div class="title">大学生志愿者活动</div>
    <div class="user-info-container">
      <div class="userInfo">
        <img class="avatar" :src="user.avatar" />
        <span class="user-name">{{ user.name }}</span>
      </div>
      <span class="arrow">></span>
    </div>
  </router-link>
</template>

<script>
export default {
  props: ["user"],
};
</script>

<style scoped>
.header-inner {
  display: flex;
  flex-direction: column;
  padding: 15px;
  color: white;
  text-decoration: none;
}

.title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
}

.user-info-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.userInfo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid white;
}

.user-name {
  font-weight: bold;
}

.arrow {
  font-size: 24px;
  font-weight: bold;
}
</style>
