Skip to content

Commit

Permalink
Merge pull request #14 from Tuti-Project/feature
Browse files Browse the repository at this point in the history
πŸ› μž„μ‹œ 메인 λ ˆμ΄μ•„μ›ƒ μ—λŸ¬ μˆ˜μ •
  • Loading branch information
changhwan77 authored Mar 5, 2024
2 parents 99a09e6 + e426b07 commit ad51d44
Show file tree
Hide file tree
Showing 10 changed files with 169 additions and 178 deletions.
8 changes: 2 additions & 6 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
"public": "build/web",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
8 changes: 4 additions & 4 deletions lib/common/http_error_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class HttpErrorHandler {

Future<void> handleResponse() async {
if (data['code'] == 401 || data['message'] == 'μœ νš¨ν•˜μ§€ μ•Šμ€ ν† ν°μž…λ‹ˆλ‹€.') {
TuTiSnackBar.showSnackBar(context, '둜그인이 μ„Έμ…˜μ΄ λ§Œλ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. λ‹€μ‹œ λ‘œκ·ΈμΈν•΄μ£Όμ„Έμš”.');
// TuTiSnackBar.showSnackBar(context, '둜그인이 μ„Έμ…˜μ΄ λ§Œλ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. λ‹€μ‹œ λ‘œκ·ΈμΈν•΄μ£Όμ„Έμš”.');
if (kIsWeb) {
await CustomTokenManager.removeToken();
} else {
await FlutterSecureStorageManager.removeStorage();
}
if (context.mounted) {
context.go('/home');
}
// if (context.mounted) {
// context.go('/tuti');
// }
} else {
// TuTiSnackBar.showSnackBar(context, data['message'].toString());
}
Expand Down
5 changes: 1 addition & 4 deletions lib/features/profile/services/proifle_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ class ProfileService {
Response? response;
if (memberId != null) {
response = await _dio.get(
'${StringConstants.baseUrl}/member/{memberId}',
queryParameters: {
'memberId': memberId,
},
'${StringConstants.baseUrl}/member/$memberId',
);
} else {
response = await _dio.get('${StringConstants.baseUrl}/my-page');
Expand Down
6 changes: 4 additions & 2 deletions lib/features/tutis/views/personal_branding_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:go_router/go_router.dart';
import 'package:tuti/common/constraints_scaffold.dart';
import 'package:tuti/common/service/goods_provider.dart';
import 'package:tuti/common/tuti_text.dart';
Expand All @@ -28,8 +29,8 @@ class PersonalBrandingScreen extends ConsumerWidget {
children: [
Container(
margin: EdgeInsets.only(top: 35.h, bottom: 15.h),
child: const TuTiBanner(
location: GoodsDetailScreen.routePath,
child: TuTiBanner(
onTap: () {},
title: '였직, νŠΈν‹°μ—μ„œλ§Œ μ œκ³΅ν•˜λŠ”\n2024λ…„ λ‹Ήμ‹ μ˜ 컀리어 κ³ λ―Ό ν•΄κ²° μ†”λ£¨μ…˜.',
subtitle: '체계적이고 μ•Œμ°¬ 개인 λ§žμΆ€ν˜• λ ˆλ²¨μ—…!',
),
Expand All @@ -47,6 +48,7 @@ class PersonalBrandingScreen extends ConsumerWidget {
),
),
AsyncError() => const Text('Oops, something unexpected happened'),
AsyncLoading() => const CircularProgressIndicator(),
_ => const CircularProgressIndicator(),
},
),
Expand Down
19 changes: 13 additions & 6 deletions lib/features/tutis/views/tuti_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:tuti/common/constraints_scaffold.dart';

import '../../../constants/gaps.dart';
Expand All @@ -15,12 +16,18 @@ class TuTiScreen extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const ConstraintsScaffold(
child: Column(
children: [
TuTiHeaderMobile(),
Flexible(flex: 5, child: TuTiCardMobile()),
],
return ConstraintsScaffold(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 20.w),
child: const Column(
children: [
TuTiHeaderMobile(),
Flexible(
flex: 5,
child: TuTiCardMobile(),
),
],
),
),
);
}
Expand Down
6 changes: 2 additions & 4 deletions lib/features/tutis/widgets/tuti_button_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ class TuTiButton extends StatelessWidget {
child: TuTiText.small(
context,
title,
style: Theme.of(context)
.textTheme
.bodySmall!
.copyWith(color: Colors.white, fontWeight: FontWeight.w600),
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Colors.white, fontWeight: FontWeight.w800, fontSize: 10.sp),
),
);
}
Expand Down
19 changes: 11 additions & 8 deletions lib/features/tutis/widgets/tuti_widgets/main_banner.dart
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:go_router/go_router.dart';
import 'package:tuti/common/custom_token_manager.dart';
import 'package:tuti/common/service/navigation_index_provder.dart';
import 'package:tuti/common/service/token_provider.dart';
import 'package:tuti/constants/color.dart';
import 'package:tuti/constants/gaps.dart';

class TuTiBanner extends StatelessWidget {
class TuTiBanner extends ConsumerWidget {
const TuTiBanner(
{super.key,
required this.location,
required this.onTap,
required this.title,
required this.subtitle});

final String location;
final VoidCallback onTap;
final String title;
final String subtitle;

@override
Widget build(BuildContext context) {
Widget build(BuildContext context, WidgetRef ref) {
return GestureDetector(
onTap: () {
context.push(location);
},
onTap: onTap,
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
margin: EdgeInsets.symmetric(horizontal: 10.w),
padding: EdgeInsets.symmetric(horizontal: 13.w, vertical: 10.h),
height: 80.h,
decoration: ShapeDecoration(
color: Colors.white,
Expand Down
Loading

0 comments on commit ad51d44

Please sign in to comment.