Ignore:
Timestamp:
06/24/26 16:28:50 (11 days ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Children:
a8f4a2d
Parents:
0b502c2
Message:

Fixed writer section and admin management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapterx-frontend/src/store/authStore.ts

    r0b502c2 r99c1e45  
    22import { persist } from 'zustand/middleware'
    33import { User, UserRole } from '../types'
    4 import { mockUsers } from '../data/mockData'
    54import axios from 'axios'
    65
     
    153152          const res = await axios.get(`${API_BASE}/users`)
    154153          const data: any[] = res.data?.users ?? res.data ?? []
     154          const existing = get().allUsers
    155155          const users: User[] = data.map((u: any) => ({
    156156            user_id: u.id,
     
    163163            follower_count: 0,
    164164            following_count: 0,
     165            bio: existing.find(e => e.user_id === u.id)?.bio,
    165166          }))
    166167          set({ allUsers: users })
Note: See TracChangeset for help on using the changeset viewer.