@@ -403,6 +403,13 @@ const TimelineSection = ({
403403 const actionsDisabled = timelineType === "notifications" ;
404404 const emptyMessage = timelineType === "notifications" ? "표시할 알림이 없습니다." : "표시할 글이 없습니다." ;
405405
406+ useEffect ( ( ) => {
407+ if ( ! timeline . error ) {
408+ return ;
409+ }
410+ showToast ( timeline . error , { tone : "error" } ) ;
411+ } , [ showToast , timeline . error ] ) ;
412+
406413 useEffect ( ( ) => {
407414 const el = scrollRef . current ;
408415 if ( ! el ) {
@@ -475,6 +482,13 @@ const TimelineSection = ({
475482 refreshNotifications ( ) ;
476483 } , [ notificationsOpen , refreshNotifications ] ) ;
477484
485+ useEffect ( ( ) => {
486+ if ( ! notificationsError ) {
487+ return ;
488+ }
489+ showToast ( notificationsError , { tone : "error" } ) ;
490+ } , [ notificationsError , showToast ] ) ;
491+
478492 const handleToggleFavourite = async ( status : Status ) => {
479493 if ( ! account ) {
480494 onError ( "계정을 선택해주세요." ) ;
@@ -649,7 +663,6 @@ const TimelineSection = ({
649663 < div className = "overlay-backdrop" aria-hidden = "true" />
650664 < div ref = { notificationMenuRef } className = "notification-popover panel" role = "dialog" aria-modal = "true" aria-label = "알림" >
651665 < div className = "notification-popover-body" ref = { notificationScrollRef } >
652- { notificationsError ? < p className = "error" > { notificationsError } </ p > : null }
653666 { notificationItems . length === 0 && ! notificationsLoading ? (
654667 < p className = "empty" > 표시할 알림이 없습니다.</ p >
655668 ) : null }
@@ -785,7 +798,6 @@ const TimelineSection = ({
785798 </ div >
786799 < div className = "timeline-column-body" ref = { scrollRef } >
787800 { ! account ? < p className = "empty" > 계정을 선택하면 타임라인을 불러옵니다.</ p > : null }
788- { account && timeline . error ? < p className = "error" > { timeline . error } </ p > : null }
789801 { account && timeline . items . length === 0 && ! timeline . loading ? (
790802 < p className = "empty" > { emptyMessage } </ p >
791803 ) : null }
@@ -892,6 +904,7 @@ export const App = () => {
892904 const [ mobileMenuOpen , setMobileMenuOpen ] = useState ( false ) ;
893905 const [ mobileComposeOpen , setMobileComposeOpen ] = useState ( false ) ;
894906 const { services, accountsState } = useAppContext ( ) ;
907+ const { showToast } = useToast ( ) ;
895908 const [ sections , setSections ] = useState < TimelineSectionConfig [ ] > ( ( ) => {
896909 try {
897910 const raw = localStorage . getItem ( SECTION_STORAGE_KEY ) ;
@@ -960,6 +973,14 @@ export const App = () => {
960973 const previousAccountIds = useRef < Set < string > > ( new Set ( ) ) ;
961974 const hasAccounts = accountsState . accounts . length > 0 ;
962975
976+ useEffect ( ( ) => {
977+ if ( ! actionError ) {
978+ return ;
979+ }
980+ showToast ( actionError , { tone : "error" } ) ;
981+ setActionError ( null ) ;
982+ } , [ actionError , showToast ] ) ;
983+
963984 const registerTimelineListener = useCallback ( ( accountId : string , listener : ( status : Status ) => void ) => {
964985 const next = new Map ( timelineListeners . current ) ;
965986 const existing = next . get ( accountId ) ?? new Set ( ) ;
@@ -1673,7 +1694,6 @@ export const App = () => {
16731694 { hasAccounts ? (
16741695 < section className = "main-column" >
16751696 { oauthLoading ? < p className = "empty" > OAuth 인증 중...</ p > : null }
1676- { actionError ? < p className = "error" > { actionError } </ p > : null }
16771697 { route === "home" ? (
16781698 < section className = "panel" >
16791699 { sections . length > 0 ? (
0 commit comments