@rpg-engine/long-bow 0.8.123 → 0.8.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.8.123",
3
+ "version": "0.8.126",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -49,7 +49,7 @@ export const FriendList: React.FC<IFriendListProps> = ({
49
49
  onBackFriendList,
50
50
  }) => {
51
51
  const [characterName, setCharacterName] = useState('');
52
- const [activeTab, setActiveTab] = useState('friends');
52
+ const [activeTab, setActiveTab] = useState(friends.length > 0 ? 'friends' : 'search');
53
53
 
54
54
  useEffect(() => {
55
55
  if (activeTab === 'search') {
@@ -154,7 +154,9 @@ export const FriendList: React.FC<IFriendListProps> = ({
154
154
  );
155
155
 
156
156
  const tabs = [
157
- { id: 'friends', title: `Friends (${friends.length})`, content: friendsTabContent },
157
+ ...(friends.length > 0
158
+ ? [{ id: 'friends', title: `Friends (${friends.length})`, content: friendsTabContent }]
159
+ : []),
158
160
  { id: 'search', title: 'Search', content: searchTabContent },
159
161
  {
160
162
  id: 'requests',