From 770bbf0ee9431e5fedb7fcc70387f1027b14b45c Mon Sep 17 00:00:00 2001 From: Cma_laptop Date: Fri, 9 Aug 2024 00:08:36 +0900 Subject: [PATCH] feat: Import youtube username from Oengus --- bundles/admin/scheduleImport/scheduleImportCore.tsx | 1 + bundles/admin/scheduleImport/scheduleImportTable.tsx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/admin/scheduleImport/scheduleImportCore.tsx b/bundles/admin/scheduleImport/scheduleImportCore.tsx index eb73c30b1..c363ef364 100644 --- a/bundles/admin/scheduleImport/scheduleImportCore.tsx +++ b/bundles/admin/scheduleImport/scheduleImportCore.tsx @@ -67,6 +67,7 @@ export const ScheduleImportCore = ({ event, schedule }: Props) => { twitter: runner.connections.find(conn => conn.platform === 'TWITTER')?.username, twitch: runner.connections.find(conn => conn.platform === 'TWITCH')?.username, nico: runner.connections.find(conn => conn.platform === 'NICO')?.username, + youtube: runner.connections.find(conn => (conn.platform as string) === 'YOUTUBE')?.username, platform: 'TWITCH', pronouns: runner.pronouns, }, diff --git a/bundles/admin/scheduleImport/scheduleImportTable.tsx b/bundles/admin/scheduleImport/scheduleImportTable.tsx index d62de8ed6..600a14bb5 100644 --- a/bundles/admin/scheduleImport/scheduleImportTable.tsx +++ b/bundles/admin/scheduleImport/scheduleImportTable.tsx @@ -11,7 +11,7 @@ type Props = { export const ScheduleImportTable = ({ schedule }: Props) => { const runHeaders = ['game', 'category', 'console', 'estimate', 'setup'] as const; - const runnerHeaders = ['name', 'twitter', 'nico', 'twitch', 'pronouns'] as const; + const runnerHeaders = ['name', 'twitter', 'nico', 'twitch', 'youtube', 'pronouns'] as const; const connectionsToSocials = ( connections: OengusConnection[], @@ -19,11 +19,13 @@ export const ScheduleImportTable = ({ schedule }: Props) => { twitter?: string; nico?: string; twitch?: string; + youtube?: string; } => { return { twitter: connections.find(conn => conn.platform === 'TWITTER')?.username, nico: connections.find(conn => conn.platform === 'NICO')?.username, twitch: connections.find(conn => conn.platform === 'TWITCH')?.username, + youtube: connections.find(conn => conn.platform as string === 'YOUTUBE')?.username, }; }; @@ -53,6 +55,7 @@ export const ScheduleImportTable = ({ schedule }: Props) => { {connectionsToSocials(runner.connections).twitter || ''} {connectionsToSocials(runner.connections).nico || ''} {connectionsToSocials(runner.connections).twitch || ''} + {connectionsToSocials(runner.connections).youtube || ''} {runner.pronouns} ));