mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
customizing theme primary color
This commit is contained in:
parent
7dd7d4b3eb
commit
35d7816036
@ -1,5 +1,6 @@
|
||||
|
||||
import 'antd/dist/reset.css';
|
||||
import Colors from 'constants/Colors';
|
||||
import { HashRouter as Router, Routes, Route } from "react-router-dom";
|
||||
|
||||
import { AppContextProvider } from 'context/AppContext';
|
||||
@ -18,6 +19,8 @@ import { Access } from './access/Access';
|
||||
import { Session } from './session/Session';
|
||||
import { Dashboard } from './dashboard/Dashboard';
|
||||
|
||||
import { ConfigProvider } from 'antd';
|
||||
|
||||
function App() {
|
||||
|
||||
return (
|
||||
@ -30,21 +33,23 @@ function App() {
|
||||
<ViewportContextProvider>
|
||||
<AppContextProvider>
|
||||
<AppWrapper>
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/" element={ <Root /> } />
|
||||
<Route path="/dashboard" element={ <Dashboard /> } />
|
||||
<Route path="/admin" element={ <Access mode="admin" /> } />
|
||||
<Route path="/login" element={ <Access mode="login" /> } />
|
||||
<Route path="/create" element={ <Access mode="create" /> } />
|
||||
<Route path="/session" element={
|
||||
<ConversationContextProvider>
|
||||
<Session />
|
||||
</ConversationContextProvider>
|
||||
}>
|
||||
</Route>
|
||||
</Routes>
|
||||
</Router>
|
||||
<ConfigProvider theme={{ token: { colorPrimary: Colors.primary } }}>
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/" element={ <Root /> } />
|
||||
<Route path="/dashboard" element={ <Dashboard /> } />
|
||||
<Route path="/admin" element={ <Access mode="admin" /> } />
|
||||
<Route path="/login" element={ <Access mode="login" /> } />
|
||||
<Route path="/create" element={ <Access mode="create" /> } />
|
||||
<Route path="/session" element={
|
||||
<ConversationContextProvider>
|
||||
<Session />
|
||||
</ConversationContextProvider>
|
||||
}>
|
||||
</Route>
|
||||
</Routes>
|
||||
</Router>
|
||||
</ConfigProvider>
|
||||
</AppWrapper>
|
||||
</AppContextProvider>
|
||||
</ViewportContextProvider>
|
||||
|
@ -17,7 +17,7 @@ export function useCardItem(item) {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
updateState({ logo: card.actions.getImageUrl(item.id) });
|
||||
updateState({ logo: card.actions.getCardImageUrl(item.id) });
|
||||
}, [card, item]);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -3,6 +3,7 @@ import { CardContext } from 'context/CardContext';
|
||||
import { ViewportContext } from 'context/ViewportContext';
|
||||
import { getListingImageUrl } from 'api/getListingImageUrl';
|
||||
import { getListingMessage } from 'api/getListingMessage';
|
||||
import { getCardByGuid } from 'context/cardUtil';
|
||||
|
||||
export function useContact(guid, listing, close) {
|
||||
|
||||
@ -43,14 +44,14 @@ export function useContact(guid, listing, close) {
|
||||
|
||||
useEffect(() => {
|
||||
let logo, name, location, description, handle, node, status, cardId;
|
||||
let contact = card.actions.getCardByGuid(guid);
|
||||
let contact = getCardByGuid(card.state.cards, guid);
|
||||
if (contact) {
|
||||
let cardProfile = contact?.data?.cardProfile;
|
||||
let cardDetail = contact?.data?.cardDetail;
|
||||
cardId = contact.id;
|
||||
handle = cardProfile.handle;
|
||||
node = cardProfile.node;
|
||||
logo = card.actions.getImageUrl(contact.id);
|
||||
logo = card.actions.getCardImageUrl(contact.id);
|
||||
name = cardProfile.name;
|
||||
location = cardProfile.location;
|
||||
description = cardProfile.description;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Modal, Dropdown, Menu, Tooltip } from 'antd';
|
||||
import { Button, Modal, Dropdown, Menu, Tooltip } from 'antd';
|
||||
import { Logo } from 'logo/Logo';
|
||||
import { IdentityWrapper, ErrorNotice, InfoNotice } from './Identity.styled';
|
||||
import { useIdentity } from './useIdentity.hook';
|
||||
@ -10,12 +10,9 @@ export function Identity({ openAccount, openCards, cardUpdated }) {
|
||||
|
||||
const logout = () => {
|
||||
Modal.confirm({
|
||||
title: 'Are you sure you want to logout?',
|
||||
title: 'you sure you want to logout?',
|
||||
icon: <LogoutOutlined />,
|
||||
onOk() {
|
||||
actions.logout();
|
||||
},
|
||||
onCancel() {},
|
||||
footer: <div><Button type="primary">COOL</Button></div>,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user