mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
fix: use generic error component, tab padding fixes (#6563)
* fix: use generic error component, tab padding fixes * fix: script error padding * rename errorMessage to error banner, move to ui folder * fix: replace errorAlert with errorBanner component * show orange dot always
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { closeTabs } from 'providers/ReduxStore/slices/tabs';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import ErrorBanner from 'ui/ErrorBanner';
|
||||
import Button from 'ui/Button';
|
||||
|
||||
const RequestNotFound = ({ itemUid }) => {
|
||||
@@ -29,14 +30,16 @@ const RequestNotFound = ({ itemUid }) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
const errors = [
|
||||
{
|
||||
title: 'Request no longer exists',
|
||||
message: 'This can happen when the .bru file associated with this request was deleted on your filesystem.'
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="mt-6 px-6">
|
||||
<div className="p-4 bg-orange-100 border-l-4 border-yellow-500 text-yellow-700">
|
||||
<div>Request no longer exists.</div>
|
||||
<div className="mt-2">
|
||||
This can happen when the .bru file associated with this request was deleted on your filesystem.
|
||||
</div>
|
||||
</div>
|
||||
<ErrorBanner errors={errors} className="mb-4" />
|
||||
<Button size="md" color="secondary" variant="ghost" onClick={closeTab}>
|
||||
Close Tab
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user