diff --git a/README.md b/README.md index 3438f07..a9e543f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dev Club Portal 🚀 -[![Deployment Status](https://img.shields.io/badge/deployment-live-success)](https://portal-aryanvbw.vercel.app/) +[![Deployment Status](https://img.shields.io/badge/deployment-live-success)](https://www.nstsdc.org/) [![Version](https://img.shields.io/badge/version-1.1.0-blue)](https://github.com/AryanVBW/Portal/releases) [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE) diff --git a/src/services/localStore.ts b/src/services/localStore.ts index 17cb1fe..9774cb3 100644 --- a/src/services/localStore.ts +++ b/src/services/localStore.ts @@ -14,7 +14,9 @@ const initializeStore = () => { github: 'aryanvbw', role: 'super_admin', avatar: `https://avatars.githubusercontent.com/aryanvbw`, - devCoins: 100 + devCoins: 100, + contributions: [], + joinedAt: new Date().toISOString() }; setUsers([superAdmin]); } @@ -46,10 +48,13 @@ export const addUser = (userData: SignUpData): User => { linkedin: userData.linkedin, role: 'user', avatar: `https://avatars.githubusercontent.com/${userData.github}`, - devCoins: 0 + devCoins: 10, + contributions: [], + joinedAt: new Date().toISOString() }; - setUsers([...users, newUser]); + users.push(newUser); + setUsers(users); return newUser; }; diff --git a/src/types/auth.ts b/src/types/auth.ts index cf0de40..b6ed2ae 100644 --- a/src/types/auth.ts +++ b/src/types/auth.ts @@ -7,6 +7,17 @@ export interface User { role: 'user' | 'admin' | 'super_admin'; avatar?: string; devCoins: number; + contributions: Contribution[]; + joinedAt: string; +} + +export interface Contribution { + id: string; + type: 'PR' | 'COLLAB' | 'EVENT' | 'OTHER'; + description: string; + coins: number; + date: string; + verified: boolean; } export interface SignUpData {