Skip to content

Commit

Permalink
fix: extract constants
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Aug 6, 2024
1 parent 30d1851 commit f48b589
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/renderer/src/pages/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const FooterInfo = () => (
</div>
)

const errorTypes = [
ErrorComponentType.Page,
ErrorComponentType.FeedFoundCanBeFollow,
ErrorComponentType.FeedNotFound,
] as ErrorComponentType[]
export function Component() {
const isAuthFail = useLoginModalShow()
const user = useWhoami()
Expand Down Expand Up @@ -83,11 +88,7 @@ export function Component() {
tabIndex={-1}
>
<AppErrorBoundary
errorType={[
ErrorComponentType.Page,
ErrorComponentType.FeedFoundCanBeFollow,
ErrorComponentType.FeedNotFound,
]}
errorType={errorTypes}
>
<Outlet />
</AppErrorBoundary>
Expand Down

0 comments on commit f48b589

Please sign in to comment.