Skip to content

Commit

Permalink
Merge branch 'AryanVBW:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanVBW authored Jan 7, 2025
2 parents 24e1ce9 + fef7d66 commit c047cf4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
11 changes: 8 additions & 3 deletions src/services/localStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down Expand Up @@ -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;
};

Expand Down
11 changes: 11 additions & 0 deletions src/types/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c047cf4

Please sign in to comment.