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:
sanish chirayath
2025-12-30 18:48:53 +05:30
committed by GitHub
parent d7cef7aa4e
commit 36b0a90de3
12 changed files with 90 additions and 94 deletions

View File

@@ -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>