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