mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Fix initial project loading for client
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
Box,
|
||||
ContextMenu,
|
||||
IconButton,
|
||||
MessagingSidebar,
|
||||
SupportSidebar,
|
||||
SidebarItem,
|
||||
} from '..';
|
||||
import { Add, Messaging } from '../../assets';
|
||||
@@ -44,7 +44,7 @@ const Sidebar = () => {
|
||||
const [templates, setTemplates] = useState<Array<TemplateOutput>>();
|
||||
const [features, setFeatures] = useState<Array<FeatureOutput>>();
|
||||
const [categories, setCategories] = useState<Array<CategoryOutput>>();
|
||||
const [messagingSidebarOpen, setMessagingSidebarOpen] =
|
||||
const [supportSideBarOpen, setSupportSideBarOpen] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const [getProjectsByClientId] = useLazyQuery<
|
||||
@@ -268,7 +268,7 @@ const Sidebar = () => {
|
||||
icon={<Messaging />}
|
||||
color={role}
|
||||
onClick={() =>
|
||||
setMessagingSidebarOpen(!messagingSidebarOpen)
|
||||
setSupportSideBarOpen(!supportSideBarOpen)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
@@ -276,8 +276,8 @@ const Sidebar = () => {
|
||||
</Box>
|
||||
</>
|
||||
)}
|
||||
{messagingSidebarOpen && (
|
||||
<MessagingSidebar onClose={() => setMessagingSidebarOpen(false)} />
|
||||
{supportSideBarOpen && (
|
||||
<SupportSidebar onClose={() => setSupportSideBarOpen(false)} />
|
||||
)}
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -13,11 +13,11 @@ import { GET_PROJECT_THREADS } from '../../graphql/chat.api.support';
|
||||
import { Add, Empty } from '../../assets';
|
||||
import { clientSupport } from '../..';
|
||||
|
||||
type MessagingSidebarProps = {
|
||||
type SupportSideBarProps = {
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
const MessagingSidebar = ({ onClose }: MessagingSidebarProps) => {
|
||||
const SupportSidebar = ({ onClose }: SupportSideBarProps) => {
|
||||
const role = useReactiveVar(roleVar);
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
@@ -110,4 +110,4 @@ const MessagingSidebar = ({ onClose }: MessagingSidebarProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default MessagingSidebar;
|
||||
export default SupportSidebar;
|
||||
@@ -28,7 +28,7 @@ import Specification from './Specification';
|
||||
import Chip from './Chip';
|
||||
import CategoryCard from './CategoryCard';
|
||||
import TemplateCard from './TemplateCard';
|
||||
import MessagingSidebar from './MessagingSidebar';
|
||||
import SupportSidebar from './SupportSidebar';
|
||||
|
||||
export {
|
||||
Button,
|
||||
@@ -61,5 +61,5 @@ export {
|
||||
Chip,
|
||||
CategoryCard,
|
||||
TemplateCard,
|
||||
MessagingSidebar,
|
||||
SupportSidebar,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user