Handle zero opponent IDs and hide video button
This commit is contained in:
@@ -81,29 +81,29 @@ class _AuthPageWidgetState extends ConsumerState<ScanQrCodePage> {
|
||||
),
|
||||
SizedBox(height: 20.h),
|
||||
|
||||
Consumer(
|
||||
builder: (context, ref, child) {
|
||||
return SizedBox(
|
||||
width: 280.w,
|
||||
height: 80.h,
|
||||
child: AppButton(
|
||||
label: '查看录像',
|
||||
onPressed: () async {
|
||||
final data = ref.watch(
|
||||
authProvider.select((state) => state.jwtDecodedData),
|
||||
);
|
||||
if (data == null) return;
|
||||
debugPrint('赛事名字: ${data.eventName}');
|
||||
final eventName = data.eventName ?? '';
|
||||
await ref
|
||||
.read(authProvider.notifier)
|
||||
.getRecordList(eventName);
|
||||
},
|
||||
variant: AppButtonVariant.secondary,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
// Consumer(
|
||||
// builder: (context, ref, child) {
|
||||
// return SizedBox(
|
||||
// width: 280.w,
|
||||
// height: 80.h,
|
||||
// child: AppButton(
|
||||
// label: '查看录像',
|
||||
// onPressed: () async {
|
||||
// final data = ref.watch(
|
||||
// authProvider.select((state) => state.jwtDecodedData),
|
||||
// );
|
||||
// if (data == null) return;
|
||||
// debugPrint('赛事名字: ${data.eventName}');
|
||||
// final eventName = data.eventName ?? '';
|
||||
// await ref
|
||||
// .read(authProvider.notifier)
|
||||
// .getRecordList(eventName);
|
||||
// },
|
||||
// variant: AppButtonVariant.secondary,
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
SizedBox(height: 16.h),
|
||||
|
||||
Consumer(
|
||||
|
||||
Reference in New Issue
Block a user