Skip to content

Commit

Permalink
๐Ÿ”€ :: (#96) Logout
Browse files Browse the repository at this point in the history
  • Loading branch information
jangseoyoung committed Dec 1, 2021
1 parent 753ddf0 commit 549ebed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/View/MyPage/MyPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
import UIKit
import SnapKit
import Then
import KeychainSwift
import Loaf

class MyPageViewController: UIViewController {

private let viewModel = MyPageViewModel()
private let keychain = KeychainSwift()

private lazy var profileImageView = UIImageView().then {
$0.image = R.image.profileImage()
Expand Down Expand Up @@ -142,6 +145,9 @@ extension MyPageViewController: UITableViewDelegate, UITableViewDataSource {
navigationController?.pushViewController(LikedProductViewController(), animated: true)
case [1, 1]:
navigationController?.pushViewController(EditProfileViewController(), animated: true)
case [1, 2]:
self.keychain.delete("ACCESS-TOKEN")
self.view.window?.rootViewController = LoginViewController()
default:
break
}
Expand Down

0 comments on commit 549ebed

Please sign in to comment.