Skip to content

Commit

Permalink
update supabase types
Browse files Browse the repository at this point in the history
  • Loading branch information
Aero56 committed Nov 8, 2023
1 parent fa0a50c commit cacf8dc
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pages/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const Player = () => {
return <p>Loading...</p>;
}

if (!player) {
return <p>This player does not exist on runefinder.</p>;
if (!player?.username) {
return <p>This player does not exist on RuneFinder.</p>;
}

const isPlayerMe = player.id === user?.id;
Expand Down
50 changes: 49 additions & 1 deletion src/types/supabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ export interface Database {
};
Relationships: [];
};
badges: {
Row: {
id: number;
name: string;
};
Insert: {
id?: number;
name: string;
};
Update: {
id?: number;
name?: string;
};
Relationships: [];
};
comments: {
Row: {
comment: string;
Expand Down Expand Up @@ -100,7 +115,7 @@ export interface Database {
};
Insert: {
created_at?: string;
created_by?: string;
created_by: string;
id?: string;
name: string;
size: number;
Expand Down Expand Up @@ -171,6 +186,39 @@ export interface Database {
},
];
};
user_badges: {
Row: {
badge_id: number;
id: number;
user_id: string;
};
Insert: {
badge_id: number;
id?: number;
user_id: string;
};
Update: {
badge_id?: number;
id?: number;
user_id?: string;
};
Relationships: [
{
foreignKeyName: 'user_badges_badge_id_fkey';
columns: ['badge_id'];
isOneToOne: false;
referencedRelation: 'badges';
referencedColumns: ['id'];
},
{
foreignKeyName: 'user_badges_user_id_fkey';
columns: ['user_id'];
isOneToOne: false;
referencedRelation: 'users';
referencedColumns: ['id'];
},
];
};
users: {
Row: {
created_at: string;
Expand Down

0 comments on commit cacf8dc

Please sign in to comment.